I was going about figuring out how to set up the Quickstart when I figured
out (sort of) what's wrong. 

The fields aren't always going back to null - they're actually going back to
what's applied to the bean in the backing property model (so, if MyBean is
new, then the fields go back to null, but if I had something originally in
MyBean, the field goes back to that original value).

It's not the code in the panel that is causing the problem, it seems to be a
'MyErrorDecorator' that I add into the init() of the whole application which
turns fields red if they have a form validation error, like so:



If I comment out the addition of the MyErrorDecorator, the fields no longer
null out. However, they also obviously don't turn red anymore when the user
tries to submit the form improperly either, unfortunately.

This is MyErrorDecorator. I'm not doing .clear on the components in here, so
I don't think it should ruin what the user has entered. What am I doing
wrong here? I think the problem might be that we are calling .isValid() in
the isInvalidFormComponent(Component component) method on all of the
components to know if they are red or not -- and that calls validation which
might force the field back to null.. or something. Does that sound
plausible?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AjaxFormComponentUpdatingBehavior-and-AjaxFormChoiceComponentUpdatingBehavior-Erases-All-Other-Fields-tp4671669p4671681.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to