Hi!

Try setting the cancel button's type to "submit" instead of "button", then the onSubmit method should be called. Though you might have to disable default form processing for the cancel button, depending on your form.

HTH, Chris

--
The Sanity Resort <http://sanityresort.blogspot.com/>

Am 30.07.2011 02:45, schrieb eugenebalt:
It's something simple that I'm forgetting, but my non-Submit button (e.g.
"Cancel") is not getting called from my Form.

The button is a simple Button, not Ajax.


My HTML (using [] to avoid rendering here):

[form wicket:id=".." ]
   [input wicket:id="btnReturn" type="button" value="Return to Home Page"
style="width: 300px" /]
[/form]

My Java:

         add(new Button("btnReturn") {

                 @Override
                 public void onSubmit() {
                     System.out.println("Clicked");
                }

             });


Thanks

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Non-Submit-Button-Not-Getting-Called-from-Form-tp3705651p3705651.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



<http://sanityresort.blogspot.com/>

Reply via email to