You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Nikolay Petrov (JIRA)" <de...@myfaces.apache.org> on 2006/09/20 12:29:22 UTC

[jira] Created: (MYFACES-1412) Restore view phase does not conforms specification

Restore view phase does not conforms specification
--------------------------------------------------

                 Key: MYFACES-1412
                 URL: http://issues.apache.org/jira/browse/MYFACES-1412
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-127
    Affects Versions: 1.1.4
            Reporter: Nikolay Petrov
             Fix For: 1.1.5-SNAPSHOT
         Attachments: RestoreViewExecutor.java

JSF 1.1 spec, section 2.2.1 says:
-Examine the FacesContext instance for the current request. If it already
contains a UIViewRoot:
--Set the locale on this UIViewRoot to the value returned by the
getRequestLocale() method on the ExternalContext for this request.
--For each component in the component tree, determine if a ValueBinding for
"binding" is present. If so, call the setValue() method on this
ValueBinding, passing the component instance on which it was found.
--Take no further action during this phase.

As I was looking at restore view phase implementation there was no such behaviour implemented. This should be implemented as:
		if(facesContext.getViewRoot() != null) {
			facesContext.getViewRoot().setLocale(facesContext.getExternalContext().getRequestLocale());
			RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(facesContext, facesContext.getViewRoot());
			return false;
		}
At least if understand the code properly.

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

        

[jira] Updated: (MYFACES-1412) Restore view phase does not conforms specification

Posted by "Nikolay Petrov (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1412?page=all ]

Nikolay Petrov updated MYFACES-1412:
------------------------------------

    Status: Patch Available  (was: Open)

> Restore view phase does not conforms specification
> --------------------------------------------------
>
>                 Key: MYFACES-1412
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1412
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-127
>    Affects Versions: 1.1.4
>            Reporter: Nikolay Petrov
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: RestoreViewExecutor.java
>
>
> JSF 1.1 spec, section 2.2.1 says:
> -Examine the FacesContext instance for the current request. If it already
> contains a UIViewRoot:
> --Set the locale on this UIViewRoot to the value returned by the
> getRequestLocale() method on the ExternalContext for this request.
> --For each component in the component tree, determine if a ValueBinding for
> "binding" is present. If so, call the setValue() method on this
> ValueBinding, passing the component instance on which it was found.
> --Take no further action during this phase.
> As I was looking at restore view phase implementation there was no such behaviour implemented. This should be implemented as:
> 		if(facesContext.getViewRoot() != null) {
> 			facesContext.getViewRoot().setLocale(facesContext.getExternalContext().getRequestLocale());
> 			RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(facesContext, facesContext.getViewRoot());
> 			return false;
> 		}
> At least if understand the code properly.

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

        

[jira] Updated: (MYFACES-1412) Restore view phase does not conforms specification

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1412?page=all ]

Martin Marinschek updated MYFACES-1412:
---------------------------------------

        Status: Resolved  (was: Patch Available)
    Resolution: Fixed

Thanks to Nikolay Petrov for hunting down this spec-compatibility bug and fixing it.

regards,

Martin

> Restore view phase does not conforms specification
> --------------------------------------------------
>
>                 Key: MYFACES-1412
>                 URL: http://issues.apache.org/jira/browse/MYFACES-1412
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-127
>    Affects Versions: 1.1.4
>            Reporter: Nikolay Petrov
>         Assigned To: Martin Marinschek
>             Fix For: 1.1.5-SNAPSHOT
>
>         Attachments: RestoreViewExecutor.java
>
>
> JSF 1.1 spec, section 2.2.1 says:
> -Examine the FacesContext instance for the current request. If it already
> contains a UIViewRoot:
> --Set the locale on this UIViewRoot to the value returned by the
> getRequestLocale() method on the ExternalContext for this request.
> --For each component in the component tree, determine if a ValueBinding for
> "binding" is present. If so, call the setValue() method on this
> ValueBinding, passing the component instance on which it was found.
> --Take no further action during this phase.
> As I was looking at restore view phase implementation there was no such behaviour implemented. This should be implemented as:
> 		if(facesContext.getViewRoot() != null) {
> 			facesContext.getViewRoot().setLocale(facesContext.getExternalContext().getRequestLocale());
> 			RestoreStateUtils.recursivelyHandleComponentReferencesAndSetValid(facesContext, facesContext.getViewRoot());
> 			return false;
> 		}
> At least if understand the code properly.

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