Bill Lucy created MYFACES-4287:
----------------------------------

             Summary: Unable to restore view which contains a stateless template
                 Key: MYFACES-4287
                 URL: https://issues.apache.org/jira/browse/MYFACES-4287
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.3.3, 2.2.12
            Reporter: Bill Lucy
            Assignee: Bill Lucy


The fix for https://issues.apache.org/jira/browse/MYFACES-4164 has introduced a 
new problem - views which contain templates with the transient attribute set 
throw an error during restoreView:

_Caused by: javax.faces.FacesException: unable to create view "/index.xhtml"_
     _at 
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:2130)_
     _at 
org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:338)_

 

This can be reproduced with a very simple view and template:
 {color:#800000}<{color}{color:#cd3131}h:body{color}{color:#800000}>{color}
 {color:#800000} <{color}{color:#cd3131}ui:composition{color} 
{color:#ff0000}template{color}{color:#000000}={color}{color:#0000ff}"template/layout.xhtml"{color}{color:#800000}/>{color}
 {color:#800000}</{color}{color:#cd3131}h:body{color}{color:#800000}>{color}
 {color:#800000}...{color}
 {color:#800000}<{color}{color:#cd3131}h:body{color}{color:#800000}>{color}
 {color:#800000} <{color}{color:#cd3131}f:view{color} 
{color:#ff0000}transient{color}{color:#000000}={color}{color:#0000ff}"true"{color}{color:#800000}>{color}
 {color:#800000} <{color}{color:#cd3131}h:form{color}{color:#800000}>{color}
 {color:#800000} <{color}{color:#cd3131}h:commandButton{color} 
{color:#ff0000}value{color}{color:#000000}={color}{color:#0000ff}"submit"{color}
 
{color:#ff0000}action{color}{color:#000000}={color}{color:#0000ff}"index"{color}{color:#800000}/>{color}
 {color:#800000} </{color}{color:#cd3131}h:form{color}{color:#800000}>{color}
 {color:#800000} </{color}{color:#cd3131}f:view{color}{color:#800000}>{color}
 {color:#800000}</{color}{color:#cd3131}h:body{color}>


The fix for this is to modify the change made in MYFACES-4146 to check if the 
view is transient _after_ buildView has been called.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to