maybe i left out too much code... <form wicket:id="currentUserPanelForm"> <ul> <li> <span wicket:id="feedback"></span> </li> .....more html omitted
</ul> <input type="submit" value="Update" /> </form> or am I still missing something? On Fri, Jan 8, 2010 at 3:10 AM, Bodis, Jerome <bo...@uni-mainz.de> wrote: > Shouldn't the FeedbackPanel be a child of the forms panel, instead of the > form itself ? (don't know exactly = Your way the feedbackpanel gets > submitted too) > > Jérôme > > -----Original Message----- > From: Chuck Brinkman [mailto:chasb1...@gmail.com] > Sent: Friday, January 08, 2010 9:02 AM > To: users@wicket.apache.org > Subject: how to clear validation error > > I have a form with a html submit button. In java I wrote my own onSubmit > to > handle the form processing. In the form I have a firstName field that is > required. > <li> > First Name: > <span wicket:id="borderFirstName"> > <input type="text" wicket:id="firstName"></input> > </span> > </li> > > TextField firstName = new TextField("firstName"); > firstName.setRequired(true); > form.add( > new FormComponentFeedbackBorder("borderFirstName").add( > firstName ) ); > > All works great as long as the user input is valid. If I attempt to submit > an empty firstName field I get the expected message in my FeedbackPanel and > my firstName text field gets the red asterisk. I then add a valid > firstName > and submit again. The page remains showing the valid firstName input along > with the validation errors and onSubmit does not fire. I must be doing > something wrong but can't figure it out. > > Thanks for your help. > > I'm using wicket 1.4.5, tomcat 6, java 1.6 and firefox 3.0.8 on fc9. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >