Override Form#onError Martijn
On Fri, Jan 8, 2010 at 1:16 PM, Chuck Brinkman <chasb1...@gmail.com> wrote: > I created a simple example. Here is my html and java. Once I get a > validation error my onSubmit is not called. > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > <html> > <head> > <title>Current Page</title> > <link rel="stylesheet" href="dis.css" type="text/css" /> > <meta http-equiv="Content-Type" > content="text/html; charset=ISO-8859-1" /> > </head> > <body> > <div id="myPage"> > <div id="feedbackContent"> > <span wicket:id="feedback" /> > </div> > <form wicket:id="validateForm"> > <ul> > <li> > First Name: > <span wicket:id="borderFirstName"> <input > type="text" > wicket:id="firstName"></input> </span> > </li> > </ul> > <input type="submit" value="Update" /> > </form> > </div> > <!-- myPage --> > </body> > </html> > > > public class Validate extends WebPage { > private static final Logger log = Logger.getLogger(Validate.class); > private String firstName; > > public Validate() { > super(); > init(); > } > > private void init() { > DisSession session = null; > session = DisSession.get(); > setFirstName(session.getUser().getFirstName()); > > setDefaultModel(new CompoundPropertyModel(this)); > > Form form = new Form("validateForm") { > DisSession session = null; > > �...@override > protected void onSubmit() { > log.info("onSubmit called!"); > } > }; > add(form); > > TextField firstName = new TextField("firstName"); > firstName.setRequired(true); > form.add(new FormComponentFeedbackBorder("borderFirstName") > .add(firstName)); > > FeedbackPanel fbp = new FeedbackPanel("feedback"); > add(fbp); > > } > > public String getFirstName() { > return firstName; > } > > public void setFirstName(String firstName) { > this.firstName = firstName; > } > > } > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org