Re: What is the best way to handle invalid values from a WOTextField?
Re: What is the best way to handle invalid values from a WOTextField?
- Subject: Re: What is the best way to handle invalid values from a WOTextField?
- From: Lachlan Deck <email@hidden>
- Date: Thu, 17 Jul 2008 13:53:15 +1000
On 17/07/2008, at 6:11 AM, Andrew Lindesay wrote:
I store the bad value in "validationFailedWithException(..)" and
then when the key-path hits the component controller again during
the "appendToResponse(..)" phase, it regurgitates the bad value to
the element (WOTextField usually) rather than taking it from the
EO. This way "bad data" can make its way back onto the page without
every mucking up an EO's clean state.
I have a map of invalidData in my super generic record. The controller
sets/unsets the invalid value if validation failed. If it's set, then
valueForKey returns the invalid value if not null.
In the case of a formatter, if it experiences a format exception, it
seems to let the string through. This seems to be workable for me
over a wide range of situations.
This is a problem as it means validationFailed doesn't get called right?
with regards,
--
Lachlan Deck
_______________________________________________
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