How can I set content pane widgetid attribute when?
new dijit.layout.ContentPane({
content: "<p>Optionally set new content now</p>",
style: "height:125px",
// I can set id, but widgetid will differ
id: 'someId',
// no effect
widgetid: 'myWidgetId',
// still fail
widgetId: 'how can I set you, God damn it?!'
}
I need it for content pane finding with dijit.byId(), as this method gets the element by it’s widgetid attribute.
You are already passing an Id when building your widget programmatically.
In your case, you should be able to retrieve your widget through :
The id needed by dijit.byId is in the “id” property of your widget, not in the widgetId property.
See : http://dojotoolkit.org/reference-guide/dijit/info.html#locating-widgets