• 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: OGNL syntax in inline binding...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OGNL syntax in inline binding...


  • Subject: Re: OGNL syntax in inline binding...
  • From: Farrukh Ijaz <email@hidden>
  • Date: Thu, 5 Aug 2010 17:15:12 +0300

You need to define a getter to return the id of the component. What I normally do is I define an optional binding named "id" and in the component I define a private string variable to hold the value of the id such as 

private String _id;

And in the getter I do something like this

public String id() {
   if(_id == null) {
      _id = stringValueForBinding("id", context().elementId().replace('.', '_'));
   }
   return _id;
}

What it does if the id binding is provided by the user, it uses that, otherwise get an id from the context element and replace the dot with underscore to make it _javascript_ compatible.

Farrukh 

Sent from my iPad

On 05-Aug-2010, at 3:31 PM, David BON <email@hidden> wrote:

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: OGNL syntax in inline binding...
      • From: Mike Schrag <email@hidden>
    • Re: OGNL syntax in inline binding...
      • From: David BON <email@hidden>
References: 
 >OGNL syntax in inline binding... (From: David BON <email@hidden>)

  • Prev by Date: Re: OGNL syntax in inline binding...
  • Next by Date: [ANN] Safari Extension 0.88
  • Previous by thread: Re: OGNL syntax in inline binding...
  • Next by thread: Re: OGNL syntax in inline binding...
  • Index(es):
    • Date
    • Thread