computerbum
2014-05-04 13:38:01 UTC
Hello all,
I am just making sure that I understand how to use buildRendering.
I created a widget that does not use a template it just creates a couple of
nodes and places them in the dom using domConstruct.place().
At first, I created all my nodes in postCreate but I need to create the
nodes before postCreate gets called so I decided to build and attach the
nodes in buildRendering which does what I want.
My question is, is this the right place to do this?
a little sample of the code:
buildRendering: function() {
this.inherited( arguments );
// at first I created all my node in postCreate but decided to put it here
this.label = domConstruct.place( '<label> New Account</label>',
this.accountRadioBtn.domNode, 'after');
},
postCreate: function() {
this.inherited( arguments );
}
--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/use-buildRendering-for-creating-and-placing-in-to-dom-tp4002157.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
I am just making sure that I understand how to use buildRendering.
I created a widget that does not use a template it just creates a couple of
nodes and places them in the dom using domConstruct.place().
At first, I created all my nodes in postCreate but I need to create the
nodes before postCreate gets called so I decided to build and attach the
nodes in buildRendering which does what I want.
My question is, is this the right place to do this?
a little sample of the code:
buildRendering: function() {
this.inherited( arguments );
// at first I created all my node in postCreate but decided to put it here
this.label = domConstruct.place( '<label> New Account</label>',
this.accountRadioBtn.domNode, 'after');
},
postCreate: function() {
this.inherited( arguments );
}
--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/use-buildRendering-for-creating-and-placing-in-to-dom-tp4002157.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.