You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Joshua Lim <li...@gmail.com> on 2009/07/24 05:29:50 UTC

Bypassing "required" form validation for search submit link

Hi

I have a Form with fields marked with various validators.
F1 = required
F2 = length 4
F3 = required
F4 .....

And I also have 2 submit links, "save" and "search". When I click on "save",
the normal default form processing happens. But when I click on "search" I
want to bypass all "required" validators.

I saw a suggestion to modify each FormComponent's isRequired which seems
reasonable :

TextField txt = new TextField("txtfield", model) {
 public boolean isRequired() {
   return findParent(Form.class).getRootForm().findSubmittingButton()
instanceof IRequireFields;



but is there any other alternative for this scenario ?

Josh

Wicket Development with NetBeans

Posted by Be...@actrix.co.nz.
Hi,

NetBeans is a great IDE for Wicket Development.

It will be even better with the implementation of the deploy on save
feature for HTML files in action.

Please vote for the following bug and add youself to the cc list:

http://www.netbeans.org/issues/show_bug.cgi?id=145666

The Wicket plugin can be found here
http://plugins.netbeans.org/PluginPortal/faces/PluginListPage.jsp?search=wicket


Bernard

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