Re: Reusable Subcomponent Dependent Form Values Validation Question
Re: Reusable Subcomponent Dependent Form Values Validation Question
- Subject: Re: Reusable Subcomponent Dependent Form Values Validation Question
- From: Chuck Hill <email@hidden>
- Date: Mon, 6 Dec 2004 10:15:18 -0800
invokeAction may not work depending on (a) whether your action method
returns null or no, and (b) the relative position (before or after) of
the submit button. Neither makes for a good resuable component. Why
not do it in takeValuesFromRequest after calling super? The validate
and set logic seems more appropriate to setting values than performing
an action.
Chuck
On Dec 2, 2004, at 12:45 PM, Kieran Kelleher wrote:
I have two Strings, password and passwordRepeated within a resuable
UserEdit component with a binding to "User usr" in the parent
component. The usr EO has an attribute hashedPassword where the final
SHA hashed password is stored. The parent component has the Submit and
form for the page.
Where would I validate and compare "password" and "passwordRepeated"
within the reusable component and then hash and set the EO's
attribute?
(Normally I would do this on the Submit action method, but this exists
in the parent. Studying Chucks book, chapter 5, I am thinking I should
over-ride invokeAction, call super.invokeAction() and afterward
compare my two values and throw a validation exception if different,
otherwise hash and store in the EO? ... would that be the proper
approach?)
________________________________________________________________
Dev Config = OS X 10.3.5 / Java 1.4.2_05 / WO 5.2.3 / XCode v1.5 /
MySQL 4.0.20 / Connector-J 3.0.11
Deploy Config = OS X 10.3.5 Server / Java 1.4.2_05 / WO 5.2.3 / MySQL
4.0.20 / Connector-J 3.0.11
My Blog: http://webobjects.webhop.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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