Hendrik,

I wouldn't spend too much time on it, but it may be worth your time to search 
the MyFaces issue tracker ( if you haven't already ).  I have a faint memory of 
someone doing something similar to this recently.  If not, you can always 
submit a patch.

Dennis Byrne

>-----Original Message-----
>From: Hendrik Neumann [mailto:[EMAIL PROTECTED]
>Sent: Saturday, July 22, 2006 01:14 PM
>To: 'MyFaces Discussion'
>Subject: Re: javax.servlet.ServletException using Tree2
>
>I have just taken a look at  UITreeData.getDataModel(UITreeData.java:420).
>
>This is the following snippet:
>
>        if (_restoredState != null)
>            _model.setTreeState(_restoredState); // set the restored state
>(if there is one) on the model
>
>The problem is, that both  _model and value are "null" in my  situation.
>Therefore the setTreeState-method can not be applied to _model.
>
>I don't now wheter this is a MyFaces bug or whether I did anything wrong in
>my code... nevertheless I found a quick and dirty workaround:
>
>        if (_restoredState != null)
>        {
>            if (_model == null ) _model = new TreeModelBase(new
>TreeNodeBase("", "", false));
>            _model.setTreeState(_restoredState); // set the restored state
>(if there is one) on the model
>        }
>
>This - of course - returns an empty tree, but in my situation this is
>excactly what I want, because the new JSF-site, my CommandLink is referenced
>to, does not contain a tree2-component which should be rendered.
>
>Was this information helpfull or do you need any aditional informations in
>order to find out whether this is a myfaces-bug or not?
>
>Greetings,
>Hendrik
>


Reply via email to