myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <simon.kitch...@rhe.co.nz>
Subject Re: <t:saveState> not working - not serializing correctly.
Date Mon, 02 Apr 2007 21:24:00 GMT
I Faces wrote:
> I have an xhtml page with t:saveState references a backing bean.  The backing
> bean is serializable and I have two methods private void readObject, private
> void writeObject however neither of these get called.
> 
> As I understand it these methods should get called when an object is
> serialized.  Is there something wrong with the JSF implementation of
> saveState such that these methods do not get called as they should?
> 
> How do I verify that saveState is working correctly?  After stepping through
> the code, doe not look like the <t:saveState does anything at all.

Just a wild stab: JSF supports two different serialization mechanisms:
(a) java.io.Serializable, and
(b) javax.faces.StateHolder.

If your class implements StateHolder for some reason then those methods 
will be called rather than readObject/writeObject.

But otherwise I cannot see any reason why it wouldn't be working.

You are providing an EL expression in the t:saveState value attribute, yes?

Regards,

Simon

Mime
View raw message