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