Hi,

You need to get a reference to the Checkboxes' models somehow.
The Form instantiates the Panel, and the Panel instantiates the Checkboxes.
So you have several options:
- pass the models from the form to the panel to the checkboxes
- introduce getter methods where needed so you can reach them
- use CompoundPropertyModel in the Form
- (not recommended) use get("panel:checkbox1").getDefaultModelObject()
...

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Jul 27, 2017 at 11:49 AM, ASHU_JAVA <ashu....@gmail.com> wrote:

> Hello All,
>
> I wanted to fetch the current value of 3 checkbox's on the submit button.
> The "Checkbox" is not part of my form, instead its part of a Wicket Panel
> called inside the form.
>
> The hierarchy of checkbox values inside form object is shown in below
> screenshot:-
>
> <http://apache-wicket.1842946.n4.nabble.com/file/n4678317/Sample3.png>
>
> On Submit button of my form, I wanted to fetch all checkbox values and
> update in database.
> Here's the onSubmit method
> @Override
> protected void onSubmit(final AjaxRequestTarget target, final Form<?>
> form){
> }
>
> Can anyone please suggest how I can fetch these checkbox values inside
> onSubmit() method by form object?
>
> Thanks in advance.
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Form-Children-values-tp4678317.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to