You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org> on 2010/04/13 16:58:49 UTC

[jira] Resolved: (MYFACES-2645) The view state is saved before encodeAll() is called on every UIViewParameter in an AJAX request

     [ https://issues.apache.org/jira/browse/MYFACES-2645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jakob Korherr resolved MYFACES-2645.
------------------------------------

    Fix Version/s: 2.0.0
       Resolution: Fixed

This particular issue can be resolved, because this is now working.

However there are some general problems with UIViewParameters (see jsr-314-open mail), which we should handle in other JIRA issues.

> The view state is saved before encodeAll() is called on every UIViewParameter in an AJAX request
> ------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2645
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2645
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.0-beta-3
>            Reporter: Jakob Korherr
>            Assignee: Jakob Korherr
>             Fix For: 2.0.0
>
>         Attachments: MYFACES-2645-spec-proposal.patch
>
>
> UIViewParameter calls setSubmittedValue() in encodeAll() to store the current value of the view parameter in the state as the submitted value (this helps UIViewParameter to restore its value on a postback). UIViewParameter.encodeAll() itself is called by UIViewRoot.encodeEnd() for every UIViewParameter in the view.
> If the current request is an ajax-request, the view state is currently already generated in UIViewRoot.encodeChildren() (before UIViewRoot.encodeEnd()). At this time the submitted value for every UIViewParameter is null, because its encodeAll()-method was not called yet.
> Later, when UIViewRoot.encodeEnd() is called, UIViewParameter.encodeAll() is called and it sets the submitted value correctly, but due to the fact that the state has already been generated, these changes are dropped.
> This causes the value of every UIViewParameter to be set to null in the next request, which will most likely end in validation problems with the required validator.
> The related thread to this issue from the mailing list can be found at: http://www.junlu.com/list/43/611590.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira