Description
Attached you will find a patch against MyFaces 1.2.1 head which will eliminate the need to buffer the output to write in the ViewState hidden field when using Server-Side-State-Saving.
With SSSS just a sequence number (previously jsf_sequence) will be written into the ViewState hidden field.
This patch changes just this, and avoid the use of the StateAwareWriter. The restore process based on the jsf_sequence already worked, just minor restructuring to get the next sequence number early.
When using Facelets, you'll also need a ViewHandler with the following content:
public void renderView(FacesContext context, UIViewRoot uiRoot) throws IOException, FacesException
{ StateManager stateManager = context.getApplication().getStateManager(); original.renderView(context, uiRoot); stateManager.saveView(context); } public void writeState(FacesContext context) throws IOException
{
StateManager stateManager = context.getApplication().getStateManager();
if (stateManager.isSavingStateInClient(context))
else
{ stateManager.writeState(context, new Object[2]); }}
This disables the Facelets own state handling and ensures we save the view after rendering.
Attachments
Attachments
Issue Links
- relates to
-
MYFACES-3117 Current server state saving implementation prevents multi-window usage
- Closed