Thanks Timo and Farrukh. I'll do that.
Regards.
David B.
Le 5 août 10 à 14:15, Farrukh Ijaz a écrit :
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 protected]> wrote:
Hi List,
What is the correct syntax to create an id in a woComponent
binding using a template variable?
In my pageWrapper.WO I set a component using the template variable:
<wo:Split3View id="goodMenuContentPane" panelName="menu1Panel"/>
And in the Split3View component, I try to set the id of a div to
"menu1Panel_splitter" with:
<wo:container elementName="div" id= '~$^panelname'+"_splitter"
class ="splitter" >
Obviously this synthax is wrong but I can't find the right way of
writing this.
Any help welcome.
Regards.
David B.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/farrukh.ijaz%
40fuegodigitalmedia.com
This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]