1

I am instantiating a dijit.Dialog programmatically and want to set a form as the content. This is defined in a HTML template, which I load like:

"dojo/text!./templates/CustomTabControllerEditGroupDialog.html",

and set during construction:

var myDialog = new Dialog({ ... content: template, ... });

Now I want to have data-dojo-attach-points and -events in my template, but I don't get where they point to. How do I do this? I know the issue of extending a dialog is an ongoing discussion, but I honestly think I should be possible to display a form programmatically without creating a new Dialog widget. BR, Daniel

4

1 回答 1

3

与其将 html 模板设置为内容,不如创建一个使用该模板的自定义小部件,并将该小部件的一个实例设置为对话框内容。模板中的附加点将成为小部件上的变量。

http://dojotoolkit.org/reference-guide/1.9/dijit/_TemplatedMixin.html

http://dojotoolkit.org/reference-guide/1.9/dijit/_AttachMixin.html#dijit-attachmixin

于 2013-09-02T11:34:21.683 回答