I am using the wicket version 1.1-b4, 
when setDefaultFormProcessing() is set to false, the form is not getting submitted.
 
I have a form with the following code.
 
Button backButton = new Button("backButton")
backButton.setDefaultFormProcessing(false);
add(backButton);
 
 
public void onSubmit()
{   
    Button button = findSubmittingButton();
    if(button.getId().equals("backButton")) 
   {
       //go back 
   }
   else
   {
       // do something
   }
}
 
how ever if i change the code like the following - it works
 
Button backButton = new Button("backButton")
  {
   protected void onSubmit()
   {
     //go back  
   }
  } ;
  backButton.setDefaultFormProcessing(false);
  add(backButton);
 
 
Can't i have multiple buttons in a form and a common onSubmit method.
Or should i be following the second approach when i want to bypass the the validation and do a submit.
 
 
Regards
Dipu
 
 
 

Reply via email to