• 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: get API Binded value name ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: get API Binded value name ...


  • Subject: Re: get API Binded value name ...
  • From: Chuck Hill <email@hidden>
  • Date: Sun, 21 Aug 2011 11:30:50 -0700

    /**
     * Returns the <code>WOAssociation</code> for this binding, or nil if it is not bound.
     *
     * @param bindingName the binding name to be evaluated
     * @return the <code>WOAssociation</code> for this binding, or nil if it is not bound.
     */
    public WOAssociation associationForBinding(String bindingName)
    {
        /** require [valid_param] bindingName != null; **/

        WOAssociation associationForBinding = null;

        if (hasBinding(bindingName))
        {
            int bindingIndex = bindingKeys().indexOfObject(bindingName);
            associationForBinding = (WOAssociation) associations().objectAtIndex(bindingIndex);
        }

        return associationForBinding;
    }



    /**
     * Returns the string for this binding, as represented in the WOD file, rather than the value it is bound to.  For example if the WOD file has value=message; this method returns "message" rather than the value that message returns when used as a key in <code>valueForKey</code>.  <b>WARNING:</b> This method is implemented using object rape of <code>WOComponent</code> and may break in the future.
     *
     * @param bindingName the binding name to be evaluated
     * @return the string for this binding
     */
    public String keyPathForBinding(String bindingName)
    {
        /** require
        [valid_param] bindingName != null;
        [has_binding] hasBinding(bindingName);
        [binding_is_settable] associationForBinding(bindingName).isValueSettable(); **/

        WOAssociation association = associationForBinding(bindingName);
        return association.keyPath();

        /** ensure [valid_result] Result != null; **/
    }



On 2011-08-21, at 10:57 AM, Matthias Jakob wrote:

> Hi there,
> i've got a little problem with some of my bindings - i need to know the binding value name:
>
> Test : MyGreatComponent {
> 	value1 = eoenterpriseobject.attribute;
> }
>
> I need to know what is binded to value1-> eoenterpriseobject.attribute (exactly this String) not its value! How can i do that in my component?
>
> Thank you all for your great help!
>
> Matthias
>
> __________________________________
>
> Dipl.-Inf.(FH) Matthias Jakob
> Entwickler
>
> Takwa GmbH
> Friedrich-List-Str. 36
> 99096 Erfurt
>
> Mobil: +49 170 5438255
> eMail: email@hidden
> WWW: http://www.takwa.de
>
> Sitz: Erfurt
> Amtsgericht Erfurt HRB 12964
> Geschäftsführung: Ingo Buchholz
> __________________________________
>
> _______________________________________________
> 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

--
Chuck Hill             Senior Consultant / VP Development

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

  • Follow-Ups:
    • Re: get API Binded value name ...
      • From: Matthias Jakob <email@hidden>
References: 
 >get API Binded value name ... (From: Matthias Jakob <email@hidden>)

  • Prev by Date: get API Binded value name ...
  • Next by Date: Re: Expired sessions and relative image links
  • Previous by thread: get API Binded value name ...
  • Next by thread: Re: get API Binded value name ...
  • Index(es):
    • Date
    • Thread