Re: Bug in WOTextField?
Re: Bug in WOTextField?
- Subject: Re: Bug in WOTextField?
- From: Timo Hoepfner <email@hidden>
- Date: Fri, 22 Feb 2008 13:28:29 +0100
Am 22.02.2008 um 10:34 schrieb Alexander Spohr:
It is a bug to deliver something in appendToResponse and not having
it anymore in takeValuesFromRequest, or vice versa.
Never change a condition in takeValuesFromRequest. It leads to odd
behavior of most WOClasses, as they can not know what you intended.
Ugh, yes of course you're right. I haven't run into this problem for
such a long time now, that I actually forgot about it...
While the "WOTextFieldWithWorkaround" works around the problem when
the field wasn't initially in the form, it doesn't help the other way
around (entered text gets lost).
That also explains why that doesn't happen with a
WOCollapsibleComponentContent, as there the state is changed in an
action, not during takeValuesFromRequest.
Nevertheless I'm still wondering, why WOTextField happily sets the
value to null on its binding, even though it's name doesn't appear in
the formValueKeys...
For the record: PWO, page 190 reads
THE GOLDEN RULE
...
Don't modify anything that the component or dynamic elements depend
on while in the sequence appendToResponse, takeValuesFromRequest, and
invokeAction.
Timo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden