0
votes

I'm new to Extjs.

I have an index.html file who contains an Ext.OnReady() function. A Viewport containing several items in different regions is created. Each item in the Viewport has the 'html' attribute, holding an iframe tag.

For example, one of the regions :

region: 'center',
bodyBorder:false,
id: '...',
html: '<iframe SRC="./bla/bla" id="..." name="..."></iframe>'

Everything works fine, but I want to replace the iframes in something alternative. Is there another way to get a server response and load it into the Viewport's regions?

I've tried to replace the 'html' attribute with an 'url' attribute, but it didn't work.

region: 'center',
bodyBorder:false,
id: '...',
url: './bla/bla'
1
If all you need is a couple of iframes, you most certainly do not need ExtJS. What is the goal of your application? What is it that you are trying to accomplish? ExtJS is about fetching data from the server and using that in client side Controls. The app should be client side, not server side pushed into iframes - if you want to go the ExtJS route of building apps. - oldwizard
The application already exists, I just need to make this minor modification. I just need to get rid of the iFrames and replace them is something else. Everything should still work the same.. - The_Mundane

1 Answers

0
votes

If the app already exists you haven't built the app with ExtJS? If you did build separate apps with ExtJS that you want to integrate into one single app you risk name clashes.

Instead of having separate html files added into "html" of each region you would take the view files that your app consist of and add them as items in the item collection of each region in your border layout.

For an example, look at the MVC tutorial. Here's a good start.

I don't know why you think this would be a "minor modification"? Your views should be ExtJS components, not html files.