Hi

The problem basically is there is no way to detect which
javax.faces.ViewState hidden fields belongs to a specific "window" or
view from the client side (javascript). To solve this it is necessary
to pass a "marker", and use it to find all related
javax.faces.ViewState hidden fields and update then when an ajax
operation occur.

The javascript fix (no_portlet_env), only works on servlet case,
because it assumes all forms belongs to the same view and the client
side code just update all of them. So, in portlet case, since a page
is a composition of multiple views, in theory the "environment" should
generate an unique identifier. In practice, each portlet is a
"window", and each window requires its own windowId. To solve this,
the portlet container should provide a way to identify a page from
other in the same browser, and then use that identifier to build
another one "per portlet".

At the end, to solve this problem it is necessary to add windowId
concept on the spec. In theory it is possible to create a fix and add
the missing windowId hidden field using a custom ResponseStateManager
wrapper and adding some code on the client side (changing some parts
of jsf.js), but instead it is even better to fix the spec.

regards,

Leonardo Uribe

Reply via email to