On Mon, Dec 28, 2009 at 4:49 AM, Early Morning <[email protected]> wrote:
> Hi all,
>
> I created a custom DataTable based on AjaxFallbackDefaultDataTable, as well
> as a ChecBoxColumn based on the CheckBoxColumn in wicket-phonebook. My
> questions:
>
> 1. Would it be also possible to create a RadioColumn for the DataTable? From
> what I've read, I need to add the entire DataTable to the RadioGroup, so I'm
> not sure if it's possible to implement this as a column. How would I
> implement this as a column?
it is possible without a RadioGroup/Radio components, simply write
your own component that represents the input type="radio".
> 2. Relatedly, is there a way for me to implement the CheckBoxColumn having a
> CheckGroup with a select all checkbox in the header?
you dont need a CheckGroup for this also, it is trivial to write a
simple javascript. every CheckBoxColumn should create a uuid when it
is constructed, either using UUID.randomUUID or Session.nextUuid().
then append this uuid as a class to the input type="checkbox" you are
using. once this is done you have a way to identify all related
checkboxes in the page. then it is simply a matter of creating a
checkbox that in onclick does some javascript like
$("."+myuuid).checked=this.checked; and putting it into a panel that
is used as a header of the column. phew.
-igor
>
>
> Thanks!
>
>
> Regards,
>
> Ces
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]