javascript - Custom widget defined in an HTML page loaded as dojox.layout.contentpane using href and inserted as tab page not parsing custom widgets -
i trying add new tab page using tab.addchild
programmatically after creating dojox.layout.contentpane
href
attribute.
following sample snippet of relevant code (tabmain
tab control placed in page)
dijit.byid('tabmain').addchild(new dojox.layout.contentpane({ title: 'my page', href: 'country.jsp', closable: true, parseonload: true, postcreate: function () { dojo.parser.parse(); }));
this country.jsp
has custom widget (that contain 2 standard dijit widgets).
custom widgets not parsed , hence not getting custom widget loaded, other standard dijits mentioned in country.jsp
loads perfectly.
to rule out problem page , custom widget declarations, put custom widget directly in page without loading inside contentpane/tab (and loaded inside dialog page), works fine. so, assume dojo parser not parsing custom widget, when load in content pane shown in above code.
does mean, custom widget cannot used such type of loading or missing force parser work? tried running parser on load, downloadend, downloadstart, ready events, no luck.
any appreciated.
without knowing dojo, provided snippet missing closing bracket inside contentpane
constructor call, making invalid (and not parsable).
try:
dijit.byid('tabmain').addchild(new dojox.layout.contentpane({ title: 'my page', href: 'country.jsp', closable: true, parseonload: true, postcreate: function () { dojo.parser.parse(); } }));
Comments
Post a Comment