myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Galligan" <>
Subject Re: <t:savestate.. component binding serializable problem
Date Fri, 06 Oct 2006 12:00:01 GMT
You could do the following:

1) Mark the bound reference 'transient'.  It won't be serialized.

2) Manually implement the Serialize methods.

3) Implement the 'StateHolder' interface, which is similar to #2,
except closely tied to JSF/Myfaces.  For this to work, you need a
recent tomcat source build as it was fixed not too long ago.

4) Change your design to not run 'saveState' on the whole bean (I have
no idea how your app is designed, so might not be viable).

Personally I'm going to start using #3 when needed, but my app is set
up to deal with mostly singular id values, so I generally use
'saveState' on just those values specifically rather than the whole
bean, and so I tend to avoid these issues.

Friends don't let friends use the session to store request level data.

On 10/6/06, CarlHowarth <> wrote:
> Hi,
> I have an app that uses the tomahawk savestate component to save the state
> of the backing bean. I have just tried bind a selectonemenu component to the
> backing bean however as the HtmlSelectOneMenu class is not serializable I
> get an error as this can not be saved.
> If I change to session scope, removing the savestate component the app
> works, however I do not want the bean to be stored at session level. Has
> anyone had this problem/got a work-around?
> Many thanks, Carl
> --
> View this message in context:
> Sent from the MyFaces - Users mailing list archive at

View raw message