Thanks for the response. It still does not work. I added the ajax button on the SearchForm that has the New,Cancel and I added this Refresh button just to test.
I added setOutputMarkupId(true) to the detailsPanle and then in SearchForm that extends Form added the AjaxButton protected void onSubmit(AjaxRequestTarget target, Form<?> form) { detailsPanel.getStudyForm().setDefaultModelObject(new StudyModel()); detailsPanel.getStudyForm().getStudyIdTxtFld().setEnabled(false); detailsPanel.getStudyForm().getStudyNameTxtFld().setEnabled(true); detailsPanel.setVisible(true); target.addComponent(detailsPanel); } I debugged it, and onSubmit does get invoked upto the last line target.addComponent(), the detailsPanel is not being made visible. So I cannot see if it has refreshed it! Thanks again, Niv On Tue, Aug 3, 2010 at 5:23 PM, vov <vov...@mail.ru> wrote: > > Create AjaxButton for refreshing your data: > new AjaxButton("refresh") > { > onSubmit(AjaxRequestTarget target) > { > onNew(); > targer.addComponent(detailsPanel); > } > } > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311537.html > Sent from the Wicket - User 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 > >