That would work I guess, but I don't think it makes sense to build that
logic into the dropdown, this is a function for the model, so I guess if
there are no existing ways to do it i'll have to look at writing a
"ChangeTrackedModel" or the like to wrap existing models in to manage the
change.

What I really want to be able to do is in the ajax event determine if I want
to allow the user to continue with the change, present them with a dialog or
just cancel the change.

And I wan to be able to just attach this logic to existing components
without having to extend classes all over the shop.

Is there anything like that around?  I've looked through wicketstuff, but
nothing jumped out at me.

Cheers,
Steve

On Fri, Aug 27, 2010 at 4:35 PM, Igor Vaynberg <[email protected]>wrote:

> class mydropdown extends dropdown {
> private object last;
> protected void updatemodel() {
>   last=getmodelobject();
>  super.updatemodel();
> }
>
> -igor
>
> On Thu, Aug 26, 2010 at 6:39 PM, Steve Mactaggart
> <[email protected]> wrote:
> > Hi All,
> >
> > I'm not sure if there is a wicket way to do this, or if I have to mange
> the
> > data myself, but we have a screen that has a select on it and need to
> detect
> > the user changing the value.
> > This is simply achieved with a AjaxFormComponentUpdatingBehavior, and
> works
> > well.
> >
> > My problem is that by the time MY code gets executed, the component has
> > updated the model with the newly selected option, thus losing the
> existing
> > value.
> >
> > I'm guessing AjaxFormComponentUpdatingBehavior won't have any way to
> track
> > this change, but is there any other behaviour I can use that allows me to
> > see the change in value?
> >
> > I hope that makes sense, if not let me know and I'll post a simple
> example.
> >
> > Cheers,
> > Steve
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to