2011-11-25 2 views
1

컨텐츠 분할 창 widgetid 속성은 어떻게 설정할 수 있습니까? 그것은 widgetid 속성의에 의해이 방법은 요소를수록Dojo : 컨텐츠 분할 창 widgetid 속성 설정

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?!' 
} 

나는, dijit.byId()와 컨텐츠 구획을 찾는 것이 필요합니다.

답변

1

위젯을 만든 후에 widgetId 속성을 설정할 수 있습니다.

var w = new dijit.layout.ContentPane({ 
    content: "<p>Optionally set new content now</p>", 
    style: "height:125px" 
} 

w.domNode.setAttribute("widgetId", "customWidgetId");