• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stateless but get bindings of childs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stateless but get bindings of childs


  • Subject: Re: Stateless but get bindings of childs
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 27 Jul 2007 08:14:23 -0700

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



--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific 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


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>)

  • Prev by Date: Re: excludeObjectFromPropertyWithKey weird error
  • Next by Date: Article : The Need for BigDecimal from Sun Java Tech
  • Previous by thread: Re: Stateless but get bindings of childs
  • Next by thread: Re: Stateless but get bindings of childs
  • Index(es):
    • Date
    • Thread