Without seeing the code I can't be of much help, but I think the line:
detailsPanel.getStudyForm().setModelObject(studyModel);
Should be:
detailsPanel.getStudyForm().setModel(studyModel);
You could also keep a reference to the studyModel when you construct the
Form and just call:
studyModel.setStudy();
But, it really depends on how you implement the StudyModel and how you
access it.
Cheers,
Avraham
On Tue, Aug 3, 2010 at 11:17 AM, nivs [via Apache Wicket] <
[email protected]<ml-node%[email protected]>
> wrote:
> Hi
>
> Can someone point me the right direction.
>
> I have a search panel that does a look up and renders a resultsPanel. I
> don't use detachable model here and used PageableListView
> On the resultsPanel,onClick, I use the hibernate entity and pass it as a
> model to the DetailsPanel. The detailsPanel renders it right no issue here.
>
>
> Now When I hit the New button(acutally after I click cancel button on
> Details, the details panel is set to visible=false). on the search, I
> expect to see a fresh page in details panel, but
> the details panel uses the old values I selected and renders it.
>
> This is what I do on onNew submit button.
>
> I reset the model and set it to the form which should call
> setDefaultObjectModel.
>
> SearchPanel
>
> onNew(){
> studyModel = new StudyModel();
> studyModel.setStudy(new Study());
> detailsPanel.getStudyForm().setModelObject(studyModel);
> detailsPanel.setVisible(true);
> }
>
> After onNew is executed, I don't see the model being updated. A bit lost
> here, any ideas?
>
> Thanks again
> Reg
> Niv
>
>
> ------------------------------
> View message @
> http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311457.html
> To start a new topic under Wicket - User, email
> [email protected]<ml-node%[email protected]>
> To unsubscribe from Wicket - User, click
> here<http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YXZyYWhhbXJAZ21haWwuY29tfDE4NDI5NDd8LTEwNzY0NzQ1ODc=>.
>
>
>
--
[]'s
Avraham Rosenzweig
[email protected]
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311658.html
Sent from the Wicket - User mailing list archive at Nabble.com.