One possible solution (for 1.2) is to call updateModel on each
checkbox in your submit handler.
For wicket 1.3, the solution would be much nicer. Just put a form in
your component. Wicket 1.3 supports nested forms and if any button in
the nested form (the one you place in your component) is submited,
only the inner form is processed. So no required fields outside the
inner form will be validated.
-Matej
On 5/12/07, blackboy zabaha <[EMAIL PROTECTED]> wrote:
>
> Hi,
> Â Â Â I'm trying to make a custom component. It shows list of items, user
> can check the checkboxs then click delete button to delete all selected
> items, or can click add button to go to an add item page.
>
> Â Â Â At first I test it alone in a form, it work ok, but later when I try
> it in real work that the form might contains some required fields or some
> validations, I got a problem that when some required fields not set or some
> inputs not valid then I click add/delete, error message will shown up, of
> course it is not good idea to fill and validate all other fields first
> before using this component.
>
> Â Â Â So I have to do setDefaultFormProcessing(false) on add button and
> delete button. but now I face the problem that my selected checkboxs not
> update their models , so I can't remove the selected items, even I try
> form.updateFormComponentModels(); but they still not updated.
>
> Â Â Â I can't find out what I do wrong and how to solve it, so I attach
> source code of my component and simple test page here and need somebody
> kindly help me solve this, Thanks you.
>
> Â Â Â P.S.
> Â Â Â - I'm using wicket 1.2.4, tomcat 5.5, java 5
> Â Â Â - something has been removed (javascript, css, img) to make the code
> more simple and concerned with the problem only
>
> Blackzabaha
>
>
>
> Give spam the boot. Take control with tough spam protection
> in the all-new Yahoo! Mail Beta.
>
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
>
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user