Your DDC is bound to the original StudyModel's study with the lines: PropertyModel propertyModel = new PropertyModel(studyModel.getStudy(),Constants.STUDY_STATUS); studyStatusDpChoices = new DropDownChoice(Constants.STUDY_DROP_DOWN_CHOICE,propertyModel,studyStatusList,defaultChoiceRenderer);
Then, you're replacing the StudyModel with this line: this.setModelObject(new StudyModel()); Thus, they get out of synch. On Fri, Aug 13, 2010 at 3:30 AM, nivs <shravann...@gmail.com> wrote: > > Hi All, > > http://apache-wicket.1842946.n4.nabble.com/file/n2323809/Code.txt Code.txt > > I have a drop down choice control on the search panel and its selected > choices are pushed to the model only once or the first time. > > Please have a look at the attached code: > > As part of this code, I noticed that when I uncomment the following line, > the drop down choice works every time.(as it is supposed to) > > public void initialise(String id){ > //cpm.getObject().setStudy(searchCriteria);///Set the search criteria object > back in order for status to be filled in the next submit/search > } > However, this will not resolve my issue, because if I refreshed the study in > the model when the details page is loaded, the problem re-occurs. > > Not sure why this is hapenning, I tried to debug as much as I can, all i can > get to is, when i re-set the model's study instance after the search results > have arrived , then it works. If I do not, then it fails to capture the > value from DDC. > > Thank you again > > Cheers > Niv > > > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/DropDownChoice-does-not-push-value-into-Model-tp2323809p2323809.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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org