Just use:
private transient HtmlTree tree;
Since the component is saved in the component tree, there is no need
to serialize it with the backing bean.
On 8/1/07, kewldude <[EMAIL PROTECTED]> wrote:
>
> Hi Andrew,
> I dont know if I understood you, but this is how my code looks right now.
>
> <t:tree2 binding="#{treeBacker.tree}" />
>
> the TreeBacker class
>
> public class TreeBacker implements Serializable{
>
> private HtmlTree tree;
>
> public void setTree(HtmlTree tree){
> this.tree = tree;
> }
>
> public HtmlTree getTree(){
> return this.tree;
> }
> }
>
> in another page i have this <t:saveState id="stateSaving"
> value="#{treeBacker}" />
>
>
> I'm trying to digest what you mean by serializing the model and the state
> but not the component...
>
>
>
> Andrew Robinson-5 wrote:
> >
> > Serialize the model and the state, but not the component.
> >
> > On 8/1/07, kewldude <[EMAIL PROTECTED]> wrote:
> >>
> >> This is my situation, I have a <t:tree2> component that has a treeBacker
> >> class at the back end. I'm using <t:saveState> to save the state of the
> >> treeBacker object. My problem right now is I tried to component bind my
> >> <t:tree2> component to a HtmlTree object declared inside my treeBacker
> >> class. Obviously, all the objects inside the treeBacker class should be
> >> Serializable for the <t:saveState> to work...so here is my error now:
> >>
> >> javax.faces.FacesException: java.io.NotSerializableException:
> >> org.apache.myfaces.custom.tree2.HtmlTree
> >>
> >> HtmlTree is not serializable.
> >>
> >> Do you have any suggestions on how to overcome this problem?
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Using-%3Ct%3AsaveState%3E-and-serialization-tf4200423.html#a11946700
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Using-%3Ct%3AsaveState%3E-and-serialization-tf4200423.html#a11949795
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>