PDA

View Full Version : id x itemId x applyTo



alexbrina
9 Mar 2009, 6:03 AM
Hi,

What are the differences between id and itemId?
Shouldn't applyTo internally set the component id and register it in the ComponentMgr?

Thanks

mjlecomte
9 Mar 2009, 6:20 AM
itemId see getComponent (http://extjs.com/deploy/dev/docs/?class=Ext.Container&member=getComponent)

id see getCmp (http://extjs.com/deploy/dev/docs/?class=Ext&member=getCmp)

http://extjs.com/learn/Ext_FAQ_layout#What_is_difference_between_contentEl.2C_applyTo_and_renderTo.3F

mjlecomte
9 Mar 2009, 6:25 AM
I'm not sure about the "should it". I would think it should....but it doesn't appear to.

mjlecomte
9 Mar 2009, 6:27 AM
maybe it should do:


getId : function(){
return this.id || this.applyTo || (this.id = "ext-comp-" + (++Ext.Component.AUTO_ID));
},

alexbrina
9 Mar 2009, 10:18 AM
your getId() suggestion would solve it just fine. Any chances it goes official? :)

I didn't get the idemId thing, is it the index for the (MixedCollection) Container.items property? It's not listed as a config option for Container nor Component, no setItemId(), so where is it set? When/For what do I use it?

Thanks