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

Paul Nicolucci commented on MYFACES-3656:
-----------------------------------------

All the beans do implement serializable.  Also note that if I make the 
viewScoped bean "session" scoped then everything also works as expected.  So 
this seems to be something with the view scope implementation from what I've 
seen in my testing thus far.
                
> ViewScoped bean fails when SERIALIZE_STATE_IN_SESSION is set to true
> --------------------------------------------------------------------
>
>                 Key: MYFACES-3656
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3656
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.15
>         Environment: WebSphere V8 and Tomcat 2.0.27
>            Reporter: Paul Nicolucci
>         Attachments: ViewScopeProblemMyFaces.war
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> My beans are defined as follows:
>    <managed-bean>
>               <managed-bean-name>appManagerBean</managed-bean-name>
>               
> <managed-bean-class>com.ibm.ws.jsf.beans.AppManagerBean</managed-bean-class>
>               <managed-bean-scope>application</managed-bean-scope>
>       </managed-bean>
>      
>       <managed-bean>
>               <managed-bean-name>emailBean</managed-bean-name>
>               
> <managed-bean-class>com.ibm.ws.jsf.beans.EmailBean</managed-bean-class>
>               <managed-bean-scope>session</managed-bean-scope>
>       </managed-bean>
>     <managed-bean>
>         <managed-bean-name>viewScopedBean</managed-bean-name>
>         
> <managed-bean-class>com.ibm.ws.jsf.beans.ViewScopedManagedBean</managed-bean-class>
>         <managed-bean-scope>view</managed-bean-scope>
>         
>         <managed-property>
>                       <property-name>emailBean</property-name>
>                       <value>#{emailBean}</value>
>               </managed-property>
>               <managed-property>
>                       <property-name>appManagerBean</property-name>
>                       <value>#{appManagerBean}</value>
>               </managed-property>
>           
>     </managed-bean>
> I've provided an application that reproduces this issue.  To reproduce follow 
> these steps:
> 1) install application 
> 2) drive a request into the following URL 
> <host>:<port>/<context-root>/ViewScopeTest1.jsf
> 3) leave the email field empty
> 4) press the submit button.
> 5) you should be taken to the error page
> 6) the following text should appear in the textArea but it does not "Invalid 
> Email: Email can Not be empty"
> The second test "ViewScopeTest2.jsf" is similar it does not contain the 
> binding attribute and just references a value from the ViewScoped bean and 
> the problem can again be reproduced.  
> It seems as though the AppManager errorMessage field is null but it has not 
> been reset.  I would think that the application scoped bean would still be 
> accessible even though the view scoped bean is out of scope.
> If you set the SERIALIZE_STATE_IN_SESSION to false and redeploy the 
> application then everything works as expected, which seems odd to me but if 
> you un-comment this from the web.xml you'll see we get the text on the error 
> page as expected.
> I've been working to debug this issue and can't seem to figure out where the 
> problem is in the MyFaces code.  I tested the same application on WAS and 
> Tomcat to ensure that it was not something specific to a server.  It seems as 
> though this is a implementation issue.
> Any help that folks can provide would be greatly appreciated!!  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to