I have a FencedFeedbackPanel inside a form but when I try to display a message, the form closes and the message is displayed on the main page instead of in my form. The form is in turn inside a modal window (see hierarchy below). When I have invalid input, I want my form (and modal window) to stay open and the error message displayed on that form so that the user can correct it.
public class MyForm extends Form { public MyForm { FencedFeedbackPanel feedbackPanel = new FencedFeedbackPanel( "myFeedbackPanel", this ); feedbackPanel.setOutputMarkupId( true ); add( feedbackPanel ); ... } } I am also using a FormValidator and am adding it to my field for validation. public class MyForm extends Form { public MyForm { ... final TextField<Integer> myInput = new TextField<Integer>( "myInput", new IModel<Integer>() { add( new MyFormValidator( myInput ) ); The code for MyFormValidator is similar to http://blog.armstrongconsulting.com/?p=40, except that I'm using a TextField<Integer> instead of a TextArea. Like the example, in my code I am just saying error() in the validator and am expecting it to display inside the form. <?xml version="1.0" encoding="UTF-8" ?> <wicket:panel xmlns:wicket="http://wicket.apache.org"> <div id="myPanel"> <form id="myForm" wicket:id="myForm"> The Hierarchy is like this: MyPage | MyModalWindow | MyPanel | MyForm | Input Field I'm using Wicket 6.5 Thank you. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Form-not-displaying-messages-correctly-tp4658351.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org