8 Mar 2011 8:16 AM #1
Referencing child components in ExtJS 4
ExtJS 3 introduced a 'ref' attribute allowing the code to refer to the child components (nested at any level) of a given component using simple dot notation.
I am trying migrate the ExtJS 3 code that uses this technique to ExtJS 4 and getting errors stating that the child component is not defined. I checked the API documentation and was not able to find any trace of 'ref' attribute.
What happened to it? What is the proper way of referencing child components in ExtJS 4?
8 Mar 2011 9:35 AM #2
- Join Date
- Mar 2007
- Notts/Redwood City
- Vote Rating
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
26 Feb 2013 4:33 PM #3
ref was removed in Ext 4? Why?
26 Feb 2013 7:56 PM #4
26 Feb 2013 9:59 PM #5
The ref functionality should have been kept. However, it should have been modified to use component selectors/query instead of it's own syntax.
I put ref in the framework for a purpose, to automate the process of looking up child components, instead of manually querying. "proper component query usage" doesn't address or apply to that at all. Why would anyone want to write a whole line of query code to get a reference that could have been automatic. In a real app, ref can save you 100s of lines of code. I used it religiously in every app I wrote with Ext 3.
16 Oct 2013 11:19 AM #6
The greatest pain migrating ExtJs3 to 4 is been this, for me.
First time I saw this ref stuff in ExtJs3, it looked so amazing to simplify the access of deep nested items that I heavly used it.
There is some way, some plugin, some class, don't know, that bring ExtJs3 ref back?
Somebody have "up ported" it to Extjs4?
Now I saw that is Mr. Slocum just before me talking! Now I see why ExtJs 4 is been so odd.
Last edited by ethraza; 16 Oct 2013 at 11:38 AM. Reason: outflowLAMPE (Linux / Apache / MySQL / PHP / ExtJs)
4 Nov 2013 5:10 AM #7
Great. None of the links that Animal is suggesting are working. :-(
8 Nov 2013 11:23 AM #8
5 Aug 2014 5:31 AM #9
if component id not singleton how can we get reference for it ....i am not able to assigne id so cant use this option for comboxes i am using
By jschwartzbeck in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 1 Nov 2010, 10:07 AM
By dlipski in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 13 Nov 2009, 7:41 AM
By elishnevsky in forum Ext 3.x: BugsReplies: 2Last Post: 7 Aug 2009, 4:46 PM
By elishnevsky in forum Ext 3.x: Help & DiscussionReplies: 8Last Post: 6 Aug 2009, 12:08 PM