Well, you should ask Werner about that... His text should be a bit more explicit that it's the top-level bean itself that has to implement StateHolder. Again, I'm guessing that you aren't exactly saving TableFiltersBean per se, you're saving some object that contains a TableFiltersBean.
But that text doesn't say "Use StateHolder"; it says use Serializable, or StateHolder. I'm saying, use Serializable. -- Adam On 3/31/06, Yura.Tkachenko <[EMAIL PROTECTED]> wrote: > > > > Thanks a bunch Adam, > > > > But I used it as advise from official MyFaces wiki about Tomahawk's > saveState > > component written by WernerPunz: > http://wiki.apache.org/myfaces/SaveState > > > > The current values of the three properties number1, number2 and text are > automatically saved within > > the client response and get restored at the next client request. > > You can also save the whole bean. Example: > > <x:saveState id="saveCalcForm" value="#{calcForm}"/> > > The whole bean automatically is saved and restored by MyFaces. To be able to > save and restore the value > > of a bean property or the bean itself, it must implement one of the > following: > > the java.io.Serializable interface > > the javax.faces.component.StateHolder interface and a > default constructor > > > > I think if it's wrong approach then need to remove it from wiki as it can > confuse people. > > > > Thanks, > > Yura. > > > > -----Original Message----- > From: Adam Winer [mailto:[EMAIL PROTECTED] > Sent: Friday, March 31, 2006 9:57 PM > To: MyFaces Discussion > Subject: Re: NotSerializableException during saveState > > > > Broadly speaking, StateHolder is only relevant for JSF-specific > > artifacts; converters, validators, event listeners, components, etc. > > Do not use it for managed beans or data layer objects. > > > > -- Adam > > > > > > On 3/30/06, Dennis Byrne <[EMAIL PROTECTED]> wrote: > > > StateHolder is something JSF implementors *must* know. It is not > something application developers *should* know - although understanding it > obviously will help you. > > > > > > Dennis Byrne > > > > > > >-----Original Message----- > > > >From: Yura.Tkachenko [mailto:[EMAIL PROTECTED] > > > >Sent: Friday, March 31, 2006 02:16 AM > > > >To: ''MyFaces Discussion'' > > > >Subject: RE: NotSerializableException during saveState > > > > > > > >Thanks, Adam > > > > > > > >Could you please explain me some more details and specific circumstances > for > > > >StateHolder? > > > > > > > >Yura. > > > > > > > > > > > > > > > >-----Original Message----- > > > >From: Adam Winer [mailto:[EMAIL PROTECTED] > > > >Sent: Friday, March 31, 2006 2:23 AM > > > >To: MyFaces Discussion > > > >Subject: Re: NotSerializableException during saveState > > > > > > > >I'd recommend implementing Serializable. StateHolder is only > > > >relevant in specific circumstances, and if you're not the sort who > > > >likes memorizing the JSF spec in detail, you'll be much better > > > >of just always implementing Serializable. All scenarios that support > > > >StateHolder also support Serializable, whereas the converse is not > > > >true. > > > > > > > >-- Adam Winer > > > > > > > > > > > >On 3/30/06, Yura.Tkachenko <[EMAIL PROTECTED]> wrote: > > > >> One little remark, when I trys to implement Serializable instead of > > > >> StateHolder everything works, but I want to know is this my issue in > bean > > > >> with StateHolder or not? > > > >> > > > >> Thanks, > > > >> Yura. > > > >> > > > >> -----Original Message----- > > > >> From: Mike Kienenberger [mailto:[EMAIL PROTECTED] > > > >> Sent: Thursday, March 30, 2006 6:54 PM > > > >> To: MyFaces Discussion > > > >> Subject: Re: NotSerializableException during saveState > > > >> > > > >> On 3/30/06, [EMAIL PROTECTED] > > > >> > javax.faces.FacesException: > > > >> > java.io.NotSerializableException: > > > >> > com.nsite.wsbuilder.TableFiltersBean > > > >> > > > > >> > at > > > >> > > org.apache.myfaces.util.StateUtils.encode64(StateUtils.java:43) > > > >> > > > >> Is com.nsite.wsbuilder.TableFiltersBean the bean you > have implemented > > > >> StateHolder on? If not, that's the problem. If so, you'll probably > > > >> need to post the bean code, but it doesn't look like it implements > > > >> StateHolder from the stacktrace. > > > >> > > > >> > > > > > > > > > > > > > > > > >

