you must add the component you want to update to the target in onSubmit method, like this:
target.addComponent(filterPanelMsgLabel); The code, tells to wicket which component to update on ajax request. Alex. Hi to all, I want to display one label when I click one button. I have wrote the code. but i am not able to display that message. my code is looking like file name : FilterPanel.java public final class ReportForm extends Form { public ReportForm(String s, final Reports model) { super(s); setOutputMarkupId(true); PropertyModel filterPanelMsgModel = new PropertyModel(this, "validationMessage"); final Label filterPanelMsgLabel = new Label("validationMsgLabel", filterPanelMsgModel); filterPanelMsgLabel.setEscapeModelStrings(false); filterPanelMsgLabel.setOutputMarkupId(true); add(filterPanelMsgLabel); //in submit button, AjaxSubmitLink saveButton = new AjaxSubmitLink("saveButton", this) { protected void onSubmit(AjaxRequestTarget target, Form form) { // To display the string in html page. setValidationMessage("Please enter valid date"); } } //getter and setter methods private String validationMessage =""; public String getValidationMessage() { return validationMessage; } public void setValidationMessage(String validationMessage) { this.validationMessage = validationMessage; } in FilterPanel.html span wicket:id="validationMsgLabel">[Message goes here] -- View this message in context: http://www.nabble.com/Important-concept-in-wicket--Please-advise-tf4942095.html#a14150303 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]