Yes, that's it! Thanks for the idea, for some reason I just did not think of it. Not only is it easy to solve like this, using Panels also gives a great extension point.

I just added a simple example of working with nested lists, and I am reworking the tree component to use this technique.

Cheers (also thanks Juergen for sending me your example),

Eelco

Kamil Rembalski wrote:

Hi,

I have done something like that with wicket 0.9.20 (three months ago).
It was a forum, with each message having a list of sub-messages. I
left the example at work (so I don't have it with me today), but as
ffar as I remmember, I had to write two components: MessageList and
Message. MessageList consisted of messages and each message contained
a MessageList. I think that I have spit the markup into two files:

Message List:

<span wcn="MessageList">
    <span wcn="message"/>
</span>

Message:
<span wcn="[message]">
   <span wcn="messageContent"/>
   <span wcn="subMessagesList"/>
</span>

I remember that in jsp+struts implementing this took me something like
10 hours, but in wicket - 2 hours :)

Regards,
Kamil

On Sun, 26 Dec 2004 03:08:44 +0100, Eelco Hillenius
<[EMAIL PROTECTED]> wrote:


People,

I've got serious problems getting my tree working the way that I want
it. It would be most elegantly solved recursively using nested lists (UL
and LI).

As an example, how would you suggest this nested structure should be
handled with Wicket?

       List l1 = new ArrayList();
       l1.add("test1.1");
       l1.add("test1.2");
       List l2 = new ArrayList();
       l2.add("test2.1");
       l2.add("test2.2");
       l2.add("test2.3");
       List l3 = new ArrayList();
       l3.add("test3.1");
       l2.add(l3);
       l2.add("test2.4");
       l1.add(l2);
       l1.add("test1.3");
       add(new TreeList("treeList", l1));

E.g. with HTML like this...:

   <ul id="wcn-treeList">
       <ul id="wcn-nested">
       <span id="wcn-label">fdfdsa</span>
      </ul>
   </ul>

The above clearly does not work currently. Constructs like these
(working with nested structures) should be an option with Wicket in
future in my opinion.

Any ideas how to tackle this?

Regards,

   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




-------------------------------------------------------
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

Reply via email to