View Full Version : Loading non-grid componet with dynamic URI

3 Mar 2015, 2:51 PM
In ExtJS 3.2.1, the following code was working:
textArea.el.load(aURL); this loads the content of text area from the URL provided.

The same code does not work in ExtJS 4.2.1, also I tried in different ways using bodyEl.el.load(URL), nothing works.
Looked around so many ExtJS books, blogs, google and unable to find the equivalent code to make this work in ExtJS4.2.1.

Could someone please help me here?


4 Mar 2015, 12:27 AM
You just need to use the correct child el:


4 Mar 2015, 8:16 AM
Thanks ~SS

4 Mar 2015, 9:17 AM
Have two items (under tabpanel) each of type textarea. Added the code "ta.inputEl.load({url: '.'});" for each of the textarea and want to load both at the same time (in a sequence). As one tabpanel item is active at one time, so only one item loads up with the url. But the other one does not and here is the error message:

TypeError: ta2.inputEl is undefined

Please advice.
Thanks ~SS

4 Mar 2015, 10:39 AM
In addition to the above error message, I have the following errors.

When I click item from the grid, with document id (a column from the grid) the two URLs get prepared (one for each textarea) and should loads the document details into both the textareas.
But first time when I click the item, the text areas do not get loaded, and from next clicks on different records, the textareas seem to be loaded. And it works from then onwards.

Any idea, how to get the textareas loaded at first time when I click the record from the grid?

4 Mar 2015, 1:59 PM
inputEl is an Ext.dom.Element wrapped around the <textarea> DOM node. It won't exist until after the component is rendered.

TabPanels use lazy rendering for children, so only the active child will be rendered at the same time as the TabPanel. The other children will be rendered when they are activated.

5 Mar 2015, 9:52 AM
Thanks and is there a way to load both the textareas under tabpanel at the same time even when one is focussed or active? Actually, both of them should bring up record, one is previous version of the details and other one is the current updated version. The business requirement is to view both when the record is chosen and they should be able to navigate to either version of the record details.

Any help in this?
Thanks ~SS

5 Mar 2015, 7:08 PM
Perhaps set deferredRender to false?

6 Mar 2015, 3:20 AM
I used "focus" to the 2nd textarea (under the same tabpanel) and executed the load command which throws the same error.

Is any specific functions (other than focus()) to make the 2nd ta "active" and load for it, then back to 1st ta and load for it?

Thanks ~SS

6 Mar 2015, 3:36 AM
Slow down, you're trying to run before you can walk.

Take some time to learn the framework. Read the guides, study the demos. Calling random methods won't get you anywhere.

focus just sets the browser's element focus. For a textarea that means you'll get the caret (text cursor) in the field. But it still needs to be rendered first.

The API docs for TabPanel go to great lengths to cover many of the relevant configs and methods. Give it a read and you'll find the relevant method for making a tab 'active'.

However, I still think deferredRender is the setting you need.

6 Mar 2015, 6:27 AM
Excellent! deferredRender is the one I was looking for, it works wonderful.
Again, thanks a lot and much appreciated for your time.

6 Mar 2015, 6:29 AM
deferredRender is the one I was looking for, it works wonderful.
Again, thanks a lot and much appreciated for your time.