[ 
https://issues.apache.org/jira/browse/MYFACES-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882226#action_12882226
 ] 

Leonardo Uribe commented on MYFACES-2770:
-----------------------------------------

The information provided is useful, but unfortunately the patch has some 
unwanted side effects:

- The call to StateManager.saveState makes changes done in the component state 
during rendering not be saved. In theory StateManager.saveState should be 
called after the view is rendered, or in the worst case, when the view state is 
written at the end of h:form. Take a look at 
FaceletViewDeclarationLanguage.renderView and then to 
ViewHandlerImpl.writeState and JspStateManagerImpl, and you will notice that 
the call to saveState is deffered in different ways according if we are using 
client side or server side state saving.

- The patch assume state saving is using a map to store state information. This 
is not necessary true because it only applies to the new jsf 2.0 state saving. 
Previous implementations of state saving does not follow this approach and in 
others like trinidad is not valid.

I suggest call UIComponent.saveState to get the state saved per component, 
convert it to bytes and finally count its size.

> Improve <ui:debug> with information about the saved state
> ---------------------------------------------------------
>
>                 Key: MYFACES-2770
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2770
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General
>    Affects Versions: 2.0.0
>            Reporter: Marius Petoi
>            Priority: Minor
>         Attachments: debug.jpg, debug.jpg, debugState.patch, debugState.patch
>
>
> Include in the <ui:debug> information about the saved state.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to