Re: StringResourceModel parameter and AJAX update
Thats it, silly me, thanks! ZV On Wed, Jan 22, 2020 at 5:42 AM Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > Hi, > > Instead of passing as parameter selectedUser try passing > > new IModel { > getObject() { > return selectedUser; > } > } > > as parameter. If you are using wicket 7.x then instead of IModel you could > use an AbstractReadonlyModel > > On Tue, Jan 21, 2020 at 11:31 PM Zbynek Vavros > wrote: > > > Hi, > > > > just simple use-case but I can't figure it out. > > > > I have DropDownChoice that selects User and Label having > > StringResourceModel where the parameter (new > > StringResourceModel(...).setParameter(selectedUser)) is the selected > user. > > How do I update the Label's model so that it reflects User selected via > > AJAX? > > > > Thanks, > > Zbynek > > > > > -- > Regards - Ernesto Reinaldo Barreiro >
Re: StringResourceModel parameter and AJAX update
Hey, AbstractReadOnlyModel seems better but you pointed me the right direction, thanks! Zbynek On Wed, Jan 22, 2020 at 5:42 AM Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > Hi, > > Instead of passing as parameter selectedUser try passing > > new IModel { > getObject() { > return selectedUser; > } > } > > as parameter. If you are using wicket 7.x then instead of IModel you could > use an AbstractReadonlyModel > > On Tue, Jan 21, 2020 at 11:31 PM Zbynek Vavros > wrote: > > > Hi, > > > > just simple use-case but I can't figure it out. > > > > I have DropDownChoice that selects User and Label having > > StringResourceModel where the parameter (new > > StringResourceModel(...).setParameter(selectedUser)) is the selected > user. > > How do I update the Label's model so that it reflects User selected via > > AJAX? > > > > Thanks, > > Zbynek > > > > > -- > Regards - Ernesto Reinaldo Barreiro >
Re: StringResourceModel parameter and AJAX update
Hi, Instead of passing as parameter selectedUser try passing new IModel { getObject() { return selectedUser; } } as parameter. If you are using wicket 7.x then instead of IModel you could use an AbstractReadonlyModel On Tue, Jan 21, 2020 at 11:31 PM Zbynek Vavros wrote: > Hi, > > just simple use-case but I can't figure it out. > > I have DropDownChoice that selects User and Label having > StringResourceModel where the parameter (new > StringResourceModel(...).setParameter(selectedUser)) is the selected user. > How do I update the Label's model so that it reflects User selected via > AJAX? > > Thanks, > Zbynek > -- Regards - Ernesto Reinaldo Barreiro