That's because of JualianS' use case. Changing the first dropdown
should reset the second and third ones' model to null. Maybe it's a
Country/State/City trio. Suppose the model of the first was
"Argentina" and the model of the second was "Buenos Aires" when
submission was done (of course, this is possible because the
individual dropdown models are being updated by means of updating
behaviors before form submission). Validation fails due to some other
reason, then you set country to -say- "Afghanistan", and try to reset
the state model from the same onchange updating behavior. But as state
it's still reading its value from the raw input "Buenos Aires", you
won't get it resetted until you also clear this input.

Regards,
Carlos

On 9/7/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> so the validation fails yet you are still updating the models???
>
> -igor
>
>
> On 9/6/07, Carlos Pita <[EMAIL PROTECTED]> wrote:
> >
> > I've debugged a simple example and what I described before happens to
> > the letter, both for ajax updating behavior and for
> > wantOnSelectionChangedNotifications/onSelectionChanged. I don't think
> > it's a bug at all, but imo it would be reasonable to clear out the
> > input if the explicit intention of changing the formcomponent value
> > (through the model object in this case) is there. Anyway, maybe this
> > is not related to JulianS' problem.
> >
> > Do you want the example?
> >
> > Regards,
> > Carlos
> >
> >
> > On 9/7/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > > does it work properly without ajax?
> > >
> > > -igor
> > >
> > >
> > > On 9/6/07, JulianS <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > I am using Wicket 1.2.6. I have 3 DropDownChoices (and some other
> > fields)
> > > > on
> > > > a form.
> > > >
> > > > The first DropDownChoice resets the selections in the other
> > > > DropDownChoices
> > > > using AjaxFormComponentUpdatingBehavior("onchange"). All the
> > > > DropDownChoices
> > > > use PropertyModels.
> > > >
> > > > This all works fine until the form is submitted and validation fails.
> > In
> > > > this (normal) situation the form is still visible, with the feedback
> > > > messages displayed, but the 2nd and 3rd DropDownChoices no longer
> > react to
> > > > the first DropDownChoice. I have verified that the properties on which
> > > > DropDownChoices depend are being correctly set.
> > > >
> > > > Is there anything I can do to make them behave properly? Any help is
> > > > appreciated.
> > > >
> > > > Thanks,
> > > > Julian
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > http://www.nabble.com/Problem-with-DropDownChoice-and-AjaxFormComponentUpdatingBehavior-tf4394596.html#a12531138
> > > > 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]
> >
> >
>

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

Reply via email to