Reusable Subcomponent Dependent Form Values Validation Question
Reusable Subcomponent Dependent Form Values Validation Question
- Subject: Reusable Subcomponent Dependent Form Values Validation Question
- From: Kieran Kelleher <email@hidden>
- Date: Thu, 2 Dec 2004 15:45:29 -0500
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:
This email sent to email@hidden