I think attachments are not good in the list, so we didn't get your code. I'm not following the way you are mixing Model with the Object and I recommend reading: https://cwiki.apache.org/WICKET/working-with-wicket-models.html
The StudyModel should be something like this: public class StudyModel implements IModel { private Study study; public Object getObject() { return study; } public void setObject(Object object) { this.study = (Study)study; } ... But if that's the case, I don't see a reason not to use the concrete Model class: new Model(study) Also, I see from your examples you are using Wicket 1.3.x, is that right? With Wicket 1.4.x and generics it all becomes much more clear. On Wed, Aug 4, 2010 at 11:38 AM, nivs [via Apache Wicket] < ml-node+2313107-368287748-293...@n4.nabble.com<ml-node%2b2313107-368287748-293...@n4.nabble.com> > wrote: > After a long battle..i have progressed an inch forward! > > The StudyModel that implements IModel seemed to have the problem. > I did not set the object in setObject...after modifying it in the following > > way..the Refresh button works. > > > public Object getObject() { > return this; > } > > public void setObject(Object object) { > StudyModel model = (StudyModel)object; > this.studyVO = model.getStudyVO(); > > } > > But I am not there as yet...now when I lookup and then click on an item > from > the list, the form again is empty..meaning the model is not being updated. > > So basically. > 1.Search Panel - Search items > 2.SearchResults - onClick > 3.Details- displayed correctly..., now I click cancel, tht hides the > details > panel > 4. I click on New/Refresh button on Search Panel > 5. A new details page is loaded - the effect of modifying setObject() in > the > Model > 6.I click on cancel on details panel > 7. And perform steps 1 to 2 > 8. An empty details panel is displayed... > > If i can get a single thread of clue..will fix this and cement it !!!! > Obviously I dont have a grip over Models.. > > Cheers > niv > > > > > On Wed, Aug 4, 2010 at 11:12 AM, Nivedan Nadaraj <[hidden > email]<http://user/SendEmail.jtp?type=node&node=2313107&i=0>>wrote: > > > > Hi > > > > > > After I added setOutputMarkupPlaceHolderTag(true) to the details panel, > the > > Ajax function works and I can see the details panel. (Which I could not > > earlier) > > However, the problem still remains as in the model has not been updated > and > > still refers to the stale/old one. > > > > @avrahmr > > I used the setModel but I get a wicket runtime exception. > > > > Thanks for your thoughts. > > Niv > > > > > > On Wed, Aug 4, 2010 at 10:25 AM, Nivedan Nadaraj <[hidden > > email]<http://user/SendEmail.jtp?type=node&node=2313107&i=1>>wrote: > > > > >> Hi, > >> > >> I have attached the code as a text file. I have removed lines that don't > > >> really make any contribution to the problem at hand after carefully > >> examining it. > >> > >> Appreciate your time if you could see any issues please let me know. > >> > >> Basically the code has the Form objects I used, and the different panels > > >> involved with it. > >> > >> Many thanks > >> Niv > >> > >> > >> On Tue, Aug 3, 2010 at 10:30 PM, Nivedan Nadaraj <[hidden > >> email]<http://user/SendEmail.jtp?type=node&node=2313107&i=2>>wrote: > > >> > >>> Avraham and Matt, > >>> > >>> Thanks for the points. I will have a look at it tomorrow and post the > >>> code if I still haven't resolved. I don't have the code on me at the > moment. > >>> Reg > >>> Niv > >>> > >>> > >>> > >>> > >>> On Tue, Aug 3, 2010 at 9:41 PM, mwilber <[hidden > >>> email]<http://user/SendEmail.jtp?type=node&node=2313107&i=3>> > wrote: > >>> > >>>> > >>>> Again without seeing more of the code some of this is guessing. > >>>> > >>>> If the component that you are trying to "update" is not part of the > >>>> original > >>>> HTML it will not be updated in the ajax response. I see that you are > >>>> marking > >>>> the component as visible and enabled. If it isn't visible during the > >>>> initial > >>>> rendering then it won't be placed in the HTML. If you mark the > component > >>>> with > >>>> > >>>> > http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean > )< > http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean%29> > > >>>> setOutputMarkupPlaceholderTag(true) then the invisible component will > > >>>> have > >>>> a placeholder to be updated during the ajax response. > >>>> -- > >>>> View this message in context: > >>>> > http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html<http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html?by-user=t> > >>>> Sent from the Wicket - User mailing list archive at Nabble.com. > >>>> > >>>> --------------------------------------------------------------------- > >>>> To unsubscribe, e-mail: [hidden > >>>> email]<http://user/SendEmail.jtp?type=node&node=2313107&i=4> > >>>> For additional commands, e-mail: [hidden > >>>> email]<http://user/SendEmail.jtp?type=node&node=2313107&i=5> > >>>> > >>>> > >>> > >> > > > > > ------------------------------ > View message @ > http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2313107.html > To start a new topic under Wicket - User, email > ml-node+1842947-1647783149-293...@n4.nabble.com<ml-node%2b1842947-1647783149-293...@n4.nabble.com> > To unsubscribe from Wicket - User, click > here<http://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YXZyYWhhbXJAZ21haWwuY29tfDE4NDI5NDd8LTEwNzY0NzQ1ODc=>. > > > -- []'s Avraham Rosenzweig avrah...@gmail.com -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2313148.html Sent from the Wicket - User mailing list archive at Nabble.com.