PDA

View Full Version : How to load external page which uses extjs



theWalli
16 Mar 2012, 12:53 AM
Hi,

I have to load a external web page into a panel/winow in my application, but I only get the HTML and normal JS content. Ext.js doesn't work as it does, if I visit that site with my browser. "launch: function()" doesn't work, App-Folder-path is unknown etc.

How I can load the normal html and js content:

loadApp3: function () {
var window = Ext.create('Ext.window.Window', {
title: 'Example 1',
width: 600,
height: 400,
autoLoad: {
url: 'view',
scripts: true,
},
closable: true
}).show();
}


This is the web page i try to inlude in my application:

<!DOCTYPE html>
<html>
<head>
<title>index</title>
<link rel="Stylesheet" type="text/css" href="../../Scripts/Ext/resources/css/ext-all.css" />
<script type="text/javascript" src="../../Scripts/Ext/ext-debug.js"></script>
</head>
<body>
This is visible.
</body>
</html>
<script type="text/javascript" src="../../Scripts/ExtDesigner/MovieDatabase/designer.js"></script>

and this is the Ext.Application that doesn't execute:

Ext.Loader.setConfig({
enabled: true
});

Ext.application({ //everything in here is ignored
name: 'MovieDatabase',
appFolder: 'Scripts/ExtDesigner/MovieDatabase/app',

controllers: [
'AppLoader'
],

stores: [
'MovieStore'
],

launch: function () {
Ext.QuickTips.init();

var cmp1 = Ext.create('MovieDatabase.view.MovieList', {
renderTo: Ext.getBody()
});
cmp1.show();
}
});
alert("This shows up");

I hope someone has a hint for me to get back on the track.
Thanks!

mitchellsimoens
16 Mar 2012, 11:37 AM
You are trying to use autoLoad on a window loading another Ext JS 4 app?

theWalli
20 Mar 2012, 4:58 AM
Yes, I'm trying to create a structure of my extjs application similar to the Northwind app (http://mvc.ext.net/).
It works with all it's features in one application, but allows to view just a single component too. (see http://mvc.ext.net/Order/OrderList/ )

The only way i can achiev this is to use something like:

addMovie: function () {
Ext.create('Ext.window.Window', {
title: 'Add Movie',
height: 264,
width: 442,
layout: 'fit',
html: '<iframe width="100%" src="view/movieDetails" style="height:100%;border:0"></iframe>',
closable: true
}).show();
},
But I think this isn't a good way to put such things in the html attribute.
For example i can't use the loading mask without autoload.