AnsweredAssumed Answered

Attach-point vs placeAt in Custom Widget

Question asked by Prashant.Kirpan on Jan 20, 2019
Latest reply on Jan 21, 2019 by rscheitlin

Hi All,

 

I was exploring add data widget code and I can see two different ways to attach DOM element while instantiating custom widgets.

 

To instantiate "AddFromFilePane" widget below code is used. this.fileNode is actually data-dojo-attach-point="fileNode" in template.

 

this.addFromFilePane = new AddFromFilePane({
wabWidget: this
},this.fileNode);

and for "LayerListPane",placeAt function is used to assign domNode.

 

this.layerListPane = new LayerListPane({
wabWidget: this
});
this.layerListPane.placeAt(this.domNode);
}

I got some idea about placeAt() on dojo/dijit custom widget document but didn't find any help for first scenario.

 

Just wanted to know main difference between these two implementation and any help document which explain first scenario in detail.

 

Any help would be appreciated,

 

Regards,

Prashant

Outcomes