myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Longo <>
Subject t:saveState and Mojarra 1.2_12
Date Wed, 08 Apr 2009 12:41:53 GMT
I have an application where I am trying to change the JSF implementation
from MyFaces Core 1.2.6 to Mojarra 1.2_12.  I was hoping the application
could still make use of the tomahawk saveState tag, as we use it heavily
throughout the application.  But it appears that the saveState tag is not
working properly with Mojarra.  I have debugged the issue and have found
that the saveState and restoreState methods do get invoked, and it is able
to restore the object successfully.  But when the restoreState method tries
to set the restored object through the ValueExpression, it eventually tries
to resolve the variable by calling Mojarra's
ManagedBeanELResolver.setValue() method.  Inside this method, there is code
to create the managed bean if the base is null (which in my case it is,
however, the property is not).  So this causes a new ManagedBean to be
created, and the one that was restored by saveState is lost.  The MyFaces
ManagedBeanResolver does not have this logic, thus it does not resolve the
bean and it continues on until the ScopedAttributeResolver class resolves

My saveState declaration looks like this (we are saving the state of the
entire bean):

<t:saveState id="MyBackingBean" value="#{MyBackingBean}"/>

I tried to write a custom EL Resolver, but I'm not sure exactly what to do
in this case, since I want to preserve the behavior of the other Resolvers.

Any ideas?


View raw message