You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Neil B. Cohen" <nc...@verisign.com> on 2007/10/23 13:04:59 UTC

Basic question - checkboxes

Still experimenting with the framework. I've managed to load data from a 
database and display it in a table on a page. Now I'd like to add a 
column of checkboxes, and do something to the selected rows when I press 
a button on the page. Can someone point me at some documentation or 
sample code that shows the best way to do that? I think I know how to 
get the checkboxes onto the screen, but I'm not sure how to

a) Figure out which ones are checked
b) Access the data in the corresponding row of the table...

I'm sure this is basic stuff - any help appreciated...

thanks very much,

nbc


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


Re: Basic question - checkboxes

Posted by Swaroop Belur <sw...@gmail.com>.
Have a look at AbstractCheckBoxModel . Will give u good idea.
Override select() to do ur stuff. For example store the table
rowmodel identifier in the model to to do some stuff for that row.



On 10/23/07, Neil B. Cohen <nc...@verisign.com> wrote:
>
> Still experimenting with the framework. I've managed to load data from a
> database and display it in a table on a page. Now I'd like to add a
> column of checkboxes, and do something to the selected rows when I press
> a button on the page. Can someone point me at some documentation or
> sample code that shows the best way to do that? I think I know how to
> get the checkboxes onto the screen, but I'm not sure how to
>
> a) Figure out which ones are checked
> b) Access the data in the corresponding row of the table...
>
> I'm sure this is basic stuff - any help appreciated...
>
> thanks very much,
>
> nbc
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>