[richfaces-issues] [JBoss JIRA] Updated: (RF-10825) ClientBehavior: view state is not saved if behavior is marked to hold initial state

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Tue Mar 29 14:28:37 EDT 2011


     [ https://issues.jboss.org/browse/RF-10825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski updated RF-10825:
--------------------------------

    Description: 
ClientBehavior contains the following code:

{noformat}    @Override
    public Object saveState(FacesContext context) {
        Object[] state = null;

        Object parentState = super.saveState(context);
        if (initialStateMarked()) {
            if (parentState != null) {
                state = new Object[] { parentState };
            }
        } else {
            
            Object savedHelper = null;
            if(behaviorStateHelper != null) {
                savedHelper = behaviorStateHelper.saveState(context);
            }
            
            state = new Object[3];
            state[0] = parentState;
            state[1] = savedHelper;
            state[2] = saveBindings(context, bindings);

        }
        return state;
    }{noformat}
however other state parts (e.g. state of state helper) should be saved even if initialStateMarked() is returning true. 

  was:
ClientBehavior contains the following code:

{noformat}    @Override
    public Object saveState(FacesContext context) {
        Object[] state = null;

        Object parentState = super.saveState(context);
        if (initialStateMarked()) {
            if (parentState != null) {
                state = new Object[] { parentState };
            }
        } else {
            
            Object savedHelper = null;
            if(behaviorStateHelper != null) {
                savedHelper = behaviorStateHelper.saveState(context);
            }
            
            state = new Object[3];
            state[0] = parentState;
            state[1] = savedHelper;
            state[2] = saveBindings(context, bindings);

        }
        return state;
    }{noformat}
however state of state helper should be saved even if initialStateMarked() is returning true. 



> ClientBehavior: view state is not saved if behavior is marked to hold initial state
> -----------------------------------------------------------------------------------
>
>                 Key: RF-10825
>                 URL: https://issues.jboss.org/browse/RF-10825
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: architectural
>    Affects Versions: 4.0.0.Final
>            Reporter: Nick Belaevski
>
> ClientBehavior contains the following code:
> {noformat}    @Override
>     public Object saveState(FacesContext context) {
>         Object[] state = null;
>         Object parentState = super.saveState(context);
>         if (initialStateMarked()) {
>             if (parentState != null) {
>                 state = new Object[] { parentState };
>             }
>         } else {
>             
>             Object savedHelper = null;
>             if(behaviorStateHelper != null) {
>                 savedHelper = behaviorStateHelper.saveState(context);
>             }
>             
>             state = new Object[3];
>             state[0] = parentState;
>             state[1] = savedHelper;
>             state[2] = saveBindings(context, bindings);
>         }
>         return state;
>     }{noformat}
> however other state parts (e.g. state of state helper) should be saved even if initialStateMarked() is returning true. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the richfaces-issues mailing list