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 PROTECTED] 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 PROTECTED]
    203 278-4085        office



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to