As suggested here by [~w.ko], maybe I hit a bug.
The high level steps to reproduce this issue are the following:
- define an async component,
- send AJAX (post) requests to that component using the resourceURL
- persist form data using FormUtils#persistFormMap()
After the last step I receive an UnsupportedOperationException: " Resource response is not allowed to invoke setRenderParameter(). at org.hippoecm.hst.core.component.HstResourceResponseImpl.setRenderParameter(HstResourceResponseImpl.java:101)". IMO the reason is the type of the request received by the doBeforeServeResource method.
As suggested by Woonsan, " FormUtils#persistFormMap() shouldn't have invoked on HstResponse#setRenderParameter()". Is it sufficient to remove this line of code from the persistFormMap method ?