Re: valueForBindings
Re: valueForBindings
- Subject: Re: valueForBindings
- From: Kieran Kelleher <email@hidden>
- Date: Fri, 20 Apr 2007 21:52:38 -0400
Many ways to skin the cat here ...... here is one concept in an old
article that is still applicable. There are more refined, but more
complex to explain, ways to do it but you are better off getting the
concept right first and refactor as your understanding grows ....
http://www.stepwise.com/Articles/Technical/2001-06-13.01.html
For stateless subcomponents you need to store the error messages
somewhere stateful ....... either in a ivar in the top-level page if
that is stateful (and nullify it at the end of append to
response) .... or store it in Thread storage (see ERXThreadStorage in
project wonder)
Also, Chuck's book Practical WO has some stuff on it I am sure. Check
it out for yourself.
Regards,
-Kieran
________________________________________________________________
Blog: http://homepage.mac.com/kelleherk/iblog/index.html
On Apr 20, 2007, at 7:40 PM, Michael Warner wrote:
I would like advise on the best way (or just any way if you prefer)
to set up the following functionality.
I have a page wrapper or template that contains a stateless , non-
synchronizing component called ErrorMessage.
ErrorMessage has one instance String variable called 'message'.
I have a page called 'NewClient' that is a partial component
contained in the page wrapper.
It too has a string var called 'message'. When a user leaves a
required field empty in NewClient, I set the message string in
NewClient to something
like "this field is required". Ideally, upon returning context
().page(), I would like the ErrorMessage component to display
the message field (i.e. "this field is required") from the
NewClient page.
Is it possible to wire this up using valueForBinding, or am I
missing something? If yes, how is this done, exactly?
Please ask for clarification if I have left anything out.
Thanks,
Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
_______________________________________________
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