make filterPanelMsgLabel a member attribute add e.g. final Label l = new Label("validationMsgLabel", "newtexthere"); l.setOutPutMarkupId(true);
filterPanelMsgLabel.replaceWith(l); target.addComponent(l); filterPanelMsgLabel = l; in the onclick method ... or am I missing the point? Michael 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] ----- Michael Sparer http://talk-on-tech.blogspot.com -- View this message in context: http://www.nabble.com/Important-concept-in-wicket--Please-advise-tf4942095.html#a14150001 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]