Re: binding a form value to a NSTimestamp field
Re: binding a form value to a NSTimestamp field
- Subject: Re: binding a form value to a NSTimestamp field
- From: "Jerry W. Walker" <email@hidden>
- Date: Tue, 18 Apr 2006 22:44:06 -0400
Hi, Bill,
One additional minor tweak I might suggest is to return context().page
() rather than null to redisplay the current page.
The invokeAction() method traverses the page template object graph
looking for some dynamic element to respond with a non-null value. It
stops traversing as soon as it gets such a return.
If your action method returns null, invokeAction will have to
traverse the entire object graph before it knows that every element
has returned null so it can return the current page as the default.
Regards,
Jerry
On Apr 18, 2006, at 6:17 PM, WebObjects wrote:
Galen,
I considered javascript first – thinking it would make things
simpler, but
as it turns out I LOVE the idea of overriding
validationFailedWithException() - it works wonderfully! (simply)
If the format of the value entered isn’t exactly parsable as m/%d/%
y, then
it fails, I catch it, I do 'stuff' and return null (same component)
displaying their mistake. It's brilliant and I love it! I do like
the
jscript below however, and will be cannibalizing it for other
purposes ;-)
(hope you don't mind).
Elated, -Bill
on 4/18/06 14:55, Galen Rhodes at email@hidden wrote:
Is Javascript an option? What about binding javascript event
handlers to
force them to enter only a properly formatted string. Given an
input field
defined in HTML like this:
<input type=text size=12 maxlength=12 onblur="handleDateBlur(this)"
onfocus="handleDateFocus(this)" onkeypress="handleDateKeypress
(event, this)">
And Javascript like so...
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
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