Hi all,
I am done with the tree component(s). I can think of extensions, but I think it is really easy to use and quite extensible right now.
In the wicket.markup.html.tree package, there is one abstract class for trees, and two specializations of it. The two trees have a different rendering strategy, which have their own pros and cons.
One (wicket.markup.html.tree.Tree) renders nested <ul> and <li> tags, e.g.:
<ul id="nested">
<li id="row">
<span id="label">foo</span>
</li>
<ul id="nested">
<li id="row">
<span id="label">bar</span>
</li>
</ul>
<li id="row">
<span id="label">suck</span>
</li>
</ul>The other (wicket.markup.html.tree.FlatTree) renderes single rows with spacer components, e.g.:
<span id="spacers"></span><span id=" spacers"></span><span id ="node"><span id="label">foo</span></span>
<span id="spacers"></span><span id ="node"><span id="label">bar</span></span>
Like I said, both have pros and cons, that's why I wanted to have both.
Currently you need to feed trees Swing's TreeModels with DefaultMutableTreeNodes. I might (or someone else) add support for nested lists sometime, though they will then be just converted to tree models with tree nodes.
I took me a long time to develop them, partially because I was not happy with the first versions. I am happy with these now, so I hereby propse them for Wicket 1.0. Look at the filebrowser example for examples of the different trees.
Hope you have fun with them,
Eelco
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop
