AFAIK there's no way to this in the markup as you'd like to do it, as
wicket's component hierarchy is bound to the html hierarchy. However it's
quite easy to implement the logic in the code.
If you use AJAX and perform a roundtrip on each collapse, just set the rows
to invisible onclick, or visible if you wish to expand them, and add them to
your ajaxrequesttarget, but be sure to setOutputMarkupId to true ...
But performing a roundtrip if the data doesn't change may be a bit of
overhead, so you might look at a javascript-only solution - or why not use
wicketstuff dojo (take a look at the wiper components) to bring some nice
looking effects in it. then you've got your javascript solution without
having to write a single line of javascript ...

hope that helps

Michael




Stefan Selariu-2 wrote:
> 
> Hi guys!
> 
> Is there a way to configure the wicket components using the html markup?
> 
> I would like to do something like this:
> 
> <table>
> <tr wicket:id="group1">
>       ...
> </tr>
> <tr wicket:id="group2" wicket:component="parent=group1">
> ...
> </tr>
> <tr wicket:id="group3" wicket:component="parent=group2">
> ...
> </tr>
> </table>
> 
> The reason for this is that I want to create tables with collapsible
> rows (if group1 is collapsed then group1 and group2 are not shown)
> 
> Thanks,
> Stefan
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


-----
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/configurable-component-tp17617353p17617487.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to