thx, i will have to get back on that, as i am going in to production 
tomorrow...

It seems that AbstractTree.java has choosen a selectionmodel with single 
selection:
treeSelectionModel.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);

that makes it hard for me to make a selection tree as only the latest selected 
path in tree is avialble....

I tried with another selection model:
treeSelectionModel.setSelectionMode(TreeSelectionModel.CONTIGUOUS_TREE_SELECTION);

But i still only get the latest selected path when i run my debugger
selectedPath: javax.swing.tree.TreePath = 
[EMAIL PROTECTED]"[Kategorier, T%F8j%2Fsko%2Fpersonlig+pleje, 
Wagner]"
selection: javax.swing.tree.TreePath[] = null  ???????????? this should be 
set ???

And here is the code onsubmit:

TreePath[] selectedPaths = 
categoriesTree.getTreeState().getSelectionModel().getSelectionPaths();
                    if (selectedPaths != null) {
                        for (int i=0; i<selectedPaths.length; i++) {
                            log.info("selected path:" + 
selectedPaths[i].getLastPathComponent());

                        }
                    }

Any ideas ?



/Frank B. 

On Sunday 17 July 2005 10:55, Eelco Hillenius wrote:
> Ah, yes. I understand now. Sorry about that stupid bug.
>
> I solved it a bit differently by providing a class that does nothing at
> all (except being a panel) and a class that has the default components:
> NodePanel and DefaultNodePanel. DefaultNodePanel is used by default, and
> is the panel you can extend if you don't want to add your own component
> structure, but just want to provide (slightly) different markup. If you
> do want to provide your own components (like you do), you should extend
> from NodePanel directly. As NodePanel itself just extends Panel, but
> does not add any components, you can extend this and use it like any
> other panel.
>
> I have included the altered tree source file. Could you please confirm
> that it solves your problem?
>
> Eelco

-- 
Frank Kastell Bengtsson
Kastell


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to