What version of wicket are you using? I just tested against head and it worked fine. My test markup looked like this:
<wicket:extend> <br/><span wicket:id="feedback">[feedback panel]</span><br/> <form wicket:id="form"> <span wicket:id="editPanel">[edit panel]</span> <input type="image" value="save" wicket:id="save"> <input type="image" wicket:id="cancel" value="cancel"> </form> </wicket:extend> And my java code looked very similar to yours. I would suggest breaking in Form.onFormSubmitted() and walking through it to see where exactly it fails. -Igor > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Dan Gould > Sent: Friday, October 28, 2005 8:22 PM > To: [email protected] > Subject: [Wicket-user] Problem with multiple submit buttons in form > > I'm trying to create a form with multiple submit buttons > follow the example on > http://www.wicket-wiki.org.uk/wiki/index.php/Multiple_submit_b uttons_in_form > > The buttons' onSubmit isn't getting called. [However, the > Form's onSubit IS getting called.] > > My HTML looks like > > <form id="backForm" wicket:id="backForm" target="_top"> > <input id="thumbdown" wicket:id="thumbdown" type="image" > src="/thumbdown.jpg" alt="thumbs down" name="thumbdown" /> > > <input id="thumbup" wicket:id="thumbup" type="image" > src="/thumbup.jpg" alt="thumbs up" name="thumbup" /> </form> > > And my code looks like: > > private final class BackForm extends Form { > public BackForm(final String componentname) > { > super(componentname); > > add(new Button("thumbup") { > protected void onSumbit() { > if(log.isDebugEnabled()) log.debug("THUMBS UP"); > } > }); > > add(new Button("thumbdown") { > protected void onSumbit() { > if(log.isDebugEnabled()) > log.debug("THUMBS DOWN"); > } > }); > } > } > > Any ideas? [I just realized: does the type="image" cause > problems for wicket? If so, is there a workaround?] > > Thanks, > Dan > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through > End of 2005 Visit http://www.jboss.com/services/certification > for more information _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
