You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by leech <le...@gmail.com> on 2010/10/18 19:48:25 UTC

Need help with Nested DataTable in Form - finding values in submit method

I think I posted this message to the wrong forum. So I'm correcting my
mistake.

I'm just getting started with Wicket.  I've looked at every example I can
find related to checkboxes in forms but none of them answer my question. 
The wicket examples have nothing in the submit button code to describe how
to do this.


I have a form.  Inside the form is a nested datatable.  In the datatable is
a column that has a check box
in it.  I accomplished this by putting a panel in the cell and then a
checkbox within the panel.  This is working fine. It runs, and the
checkboxes are displayed properly.

The problems start when I try to figure out what checkboxes were selected.

When the submit button on the form is clicked, I want to know what
checkboxes were selected.
I want to do this within the submit button because there will be other
buttons that do other tasks.

How do I find the values I'm looking for?

Lee

-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Need-help-with-Nested-DataTable-in-Form-finding-values-in-submit-method-tp3000718p3000718.html
Sent from the Users forum 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: Need help with Nested DataTable in Form - finding values in submit method

Posted by Igor Vaynberg <ig...@gmail.com>.
you do this the same way as with all other form components, bind the
checkboxes to some model that stores the values in some field you can
access. AbstractCheckBoxModel may also be useful for this usecase.

-igor

On Mon, Oct 18, 2010 at 10:48 AM, leech <le...@gmail.com> wrote:
>
> I think I posted this message to the wrong forum. So I'm correcting my
> mistake.
>
> I'm just getting started with Wicket.  I've looked at every example I can
> find related to checkboxes in forms but none of them answer my question.
> The wicket examples have nothing in the submit button code to describe how
> to do this.
>
>
> I have a form.  Inside the form is a nested datatable.  In the datatable is
> a column that has a check box
> in it.  I accomplished this by putting a panel in the cell and then a
> checkbox within the panel.  This is working fine. It runs, and the
> checkboxes are displayed properly.
>
> The problems start when I try to figure out what checkboxes were selected.
>
> When the submit button on the form is clicked, I want to know what
> checkboxes were selected.
> I want to do this within the submit button because there will be other
> buttons that do other tasks.
>
> How do I find the values I'm looking for?
>
> Lee
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Need-help-with-Nested-DataTable-in-Form-finding-values-in-submit-method-tp3000718p3000718.html
> Sent from the Users forum 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
>
>

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