| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Hi Fabrice,
On Jul 27, 2007, at 2:12 AM, Fabrice Pipart wrote:
Hi !
I gave a look to what Ulrich proposed.
It worked fine.... in one case ...
When the child is included only once in a component.
If it is included several times, the form does not know where each value is bound.
For example in my formValues dictionary, I have something like this :
0.27.7.1.5.77 = ("http://www.easyshadow.com");
anotherBindingName1 = ("00", "00", "03", "00", "06", "00", "00", "00", "40", "00", "30", "00", "23");
And consequently the values for each child components are mixed up :-(
Actually, they all get the value "00"
Is there any way to avoid that? Do I really need to find a way to make that binding name unique?
Yes, you need to make them unique.
Chuck
On Jul 25, 2007, at 7:05 PM, Chuck Hill wrote:
On Jul 25, 2007, at 7:41 AM, Ulrich Köster wrote:
valueForBinding is to talk with the parent of the component.
void takeValuesFromRequest(WORequest request, WOContext context) { super. takeValuesFromRequest(request, context); Value one = request.formValueForKey("anotherBindingName1"); Value two = request.formValueForKey("anotherBindingName2"); if(two.isBetterThen(one)) { setValueForBinding(one, "XYZ"); } else { setValueForBinding(two, "XYZ"); } } from StatelessParent.wod Text1: WOTextField { text = anotherBinding1; name="anotherBindingName1" } Text1: WOTextField { text = anotherBinding2; name="anotherBindingName2" }
The stuff should work, but I think it's not a good idea to use statefull childs when the parent is stateless.
I think it is, in fact, forbidden and WO will give you an error if you try this.
Right !
That's why I need to have the child stateless because stateless parent is an AjaxGridNavBar subclass
(WOTextField is a statefull child of StatelessParent in your case).
Hold on Uli. WOTextField is a WODynamicElement and hence stateless.
Ah ! At least I read correctly that part in your book Chuck :-)
Regards
Fabrice
www.easyshadow.com EasyMediaOnline Digital Signage Software
Easyshadow Palais de la Scala 1 avenue Henri Dunant Suite 1155 MC - 98000 Monaco
Skype: fabrice.pipart Tel. +377 97 98 21 04 (direct) Fax. +377 97 70 88 07
--
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/email@hidden
| References: | |
| >Stateless but get bindings of childs (From: Fabrice Pipart <email@hidden>) | |
| >Re: Stateless but get bindings of childs (From: Ulrich Köster <email@hidden>) | |
| >Re: Stateless but get bindings of childs (From: Chuck Hill <email@hidden>) | |
| >Re: Stateless but get bindings of childs (From: Fabrice Pipart <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.