Re: [Q] validation and "sticky invalid values"
Re: [Q] validation and "sticky invalid values"
- Subject: Re: [Q] validation and "sticky invalid values"
- From: Chuck Hill <email@hidden>
- Date: Thu, 26 Jun 2003 14:12:03 -0700
- Organization: Global Village Consulting, Inc.
You can force some invalid values into EOs by overriding
validationFailedWithException on the page. However, due to Java's
strongly typed nature some invalid values just won't go. There is
just no way you are going to get the invalid string "judy 10 2003"
into an NSTimestamp attribute. Won't go. Can't go.
The only way I can think of to do this is to have something sit
between the form and the EO. The form will display values from and
set values into this object and it will in turn set valid values into
the EO but keep invalid values to itself.
Or they might be OK with client side JavaScript validation that
prevents submission of invalid data. JS is kind of nasty and doing
that will smear the validation logic around.
Chuck
Andrew Lindesay wrote:
Hello;
A company I'm working with really wants to have the fields in a
component stick around in the case that a validation error occurs. So,
for example, some user enters some invalid values into a form that is
tied to an EO. Next they submit the values and those fields are
correctly validated as being broken. The EO does not actually take up
the values (as expected) and hence the unmodified values appear in the
response's outputted form again. Is there a "right" way to get those
values to get inserted into the EO regardless of their validity or
should I find some way to intercept the KVC mechanism at the component
level to achieve this? Of course I still need the validation mechanism
to run normally to avoid the EC from attempting to persist invalid EO's.
Any advice appreciated.
cheers.
___
Andrew Lindesay
http://www.lindesay.co.nz/
+64 21 47 0929
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.