Yes there was a fairly major change a few days ago.  Its still
experimental and I realize now there is at least one problem.  There
is a new interface TreeWalker and a default implementation
TreeWalkerBase.  The idea behind this is to allow you to provide your
own id naming scheme for dynamic trees instead of relying on the old
0, 0:1, 0:1:0 naming scheme.  By default TreeWalkerBase implements the
old naming scheme.

The idea behind allowing other TreeModels is so the user can better
support a dynamic tree.  TreeModel needs to implement certain methods
to assist the renderer since only it knows about this custom scheme. 
The most important method is getNodeById.  It also provides accessor
methods so that the tree renderer can manipulate the expand/collapse
and selected states.

The getters and setters for node are not necessary in TreeModel b/c
the current node is known by the component.  Its set by the renderer
when appropriate (kind of like the current row in a datatable.)  I
don't know what you were doing in those methods before but its
probably not necessary now since the component takes care of this for
you.

There is one problem though which is now you need to implement a
TreeWalker.  If you are using the default node naming scheme then
TreeWalkerBase might be sufficient.  WIth a dynamic model, however,
this was often a problem and you might want to come up with your own
custome node naming scheme.

There is a definite bug in the current code though.  There is nowhere
to plugin your custom TreeWalker!  I will need to address that
shortly.  Don't worry, this code is not going to be part of the
upcoming tomahawk release so we have a little time to works the bugs
out.  I definitely could use the help of the tree2 users though.  I'm
not currently using a dynamic model so I don't know if what I'm doing
here helps/hurts you.

Sean

On 2/20/06, rahmoune patrick <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've just update my application based on the nightly of the 30/12/2005 to
> the one of downloaded the 17/02.
>
> In this application, I have created my own tree2 model.
>
> Due to the last changes in tree2, two methods are no more present in the
> TreeModel interface :
> - getNode() that returns the selected node
> - and setNodeId(nodeId) that was invoked from an action listener for node
> selection
>
> Can someone point me to the new way of implementing the node selection
> function?
>
> Thank you
>
> patrick
>
>
>  ________________________________
>  Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs
> exceptionnels pour appeler la France et l'international. Téléchargez la
> version beta.
>
>

Reply via email to