PDA

View Full Version : Ext components in jDialog window?



hoeriksen
3 Aug 2010, 3:39 AM
Hi,

I'm trying to create a treeview inside a overlay window which is created using the jQuery plugin jDialog. The problem, however, is getting the Ext script to be read at the correct time (I think). When I include my js script to create the treeview in the "calling" window it complains that 'this.el is null' because the div tag that the treeview's renderTo property refers to is obviously not there yet (since it is contained in a separate html file which is opened using jDialog.

When I include the js file at the top of the "pop-up" page, the treeview is shown correctly if I open the file directly (and the script file shows up under Script tab i Firebug), but when I open the page through jDialog nothing is shown and the script file does not show up under the script tab in Firebug (but Firebug does make a GET request for it).
Does anyone know how I can get around this?

I hope all this makes sense.

Animal
3 Aug 2010, 5:22 AM
Hi,

I'm trying to create a treeview inside a overlay window which is created using the jQuery plugin jDialog.

Why impose that pain upon yourself?

Create an Ext.Window containing a TreePanel (and whatever else you need, all arranged by a layout manager)

hoeriksen
3 Aug 2010, 11:25 AM
Hehe, a very good point indeed. The reason I did this was because I have somewhat limited control over the originating window since it is part of a very large and enterprisey system, but I will look into what I can and can't do tomorrow morning when my head is fresh and rested :) Just out of curiosity, is there any way to get around this the way I thought?

Animal
3 Aug 2010, 1:06 PM
A horrible hack would me more time consuming and brittle than just making a nice Ext Window.