I think another way to do it is to call setModelObject() with the
appropriate parameter on each component that needs to be updated.  I
chose to use the modelChanged() approach, however, because I'm using
the presentation model pattern
(http://martinfowler.com/eaaDev/PresentationModel.html) that populates
the model properties behind the scenes.  At least in my experience, I
had to call modelChanged() to reflect the new values.

By the way, so far, the presentation model pattern seems to work
nicely with Wicket.  This includes using the LoadableDetachableModel
to call the presentation model to get data to populate a ListView and
dereference the data for memory conservation.  The result is less
verbose Wicket code and the option to use the presentation model in
other web frameworks.  Only time will tell if this approach will scale
with Wicket.

Chris

On 10/15/07, Rich Livingstone <[EMAIL PROTECTED]> wrote:
>
> Thanks, that worked great
>
>
>
> Christopher Gardner-2 wrote:
> >
> > I had to call modelChanged() to do this very thing.
> >
> > On 10/12/07, Rich Livingstone <[EMAIL PROTECTED]> wrote:
> >>
> >> I'm just not sure how to do this - for example, I have a drop down choice
> >> and
> >> when it changes, I need to populate other fields. I had presumed the way
> >> to
> >> do this was to change the values in an attached PropertyModel and any
> >> text
> >> or other UI fields which were attached to this model would be
> >> automatically
> >> updated. But this doesn't seem to be so.
> >>
> >> It seems an obvious thing but I can't find it in any of the forums - if
> >> it's
> >> possible it's got to be simple, yes ?
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Refresh-fields-from-model-tf4614207.html#a13177078
> >> Sent from the Wicket - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/Refresh-fields-from-model-tf4614207.html#a13224136
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to