You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Stefan Selariu <st...@gmail.com> on 2008/06/03 09:10:51 UTC

configurable component

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: configurable component

Posted by Stefan Selariu <st...@gmail.com>.
Thanks for your quick answers.

The TreeTable doesn't help me because I have different objects in the
table rows. And the groups should be able to span acros more columns.
TreeTable doesn't let me configure the table appearance using the static
html... I hope I'm not wrong :D

I guess I'll send the configuration to the component itself and
implement there the row visibility logic.

Thanks again,
Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: configurable component

Posted by Per Newgro <pe...@gmx.ch>.
Can you checkout the treetable please (see examples).
I hope it fit your needs.

Cheers
Per

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: configurable component

Posted by Michael Sparer <mi...@gmx.at>.
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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 


-----
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: configurable component

Posted by Jan Kriesten <ja...@renitence.de>.
hi stefan,

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

since you would have to add specific components 'group2' and 'group3' from 
within java, anyway, you can add 'isVisible' logic there, not?

best regards, --- jan.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org