I just wrote about similar problem. I'm using Mojarra 1.2_09, and
tomahawk12-1.1.7. I experience the bug under Tomcat 6.0.18, and 6.0.16,
but not under 6.0.14, and 6.0.13.
I don't know if the root of the problem is the same.
-Ognjen
Geoff Longo wrote:
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 it.
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?
Thanks,
Geoff