-
8 Aug 2008 1:28 AM #1
Ext.Layer
Ext.Layer
Hello,
I have a window with form. Some elements on this form and defined "inline" using xtype where some, like toolbar, grid, etc. are precreated using var grid = new Ext.... and so on.
One of precreated objects is also Layer.
var xlist = new Ext.Layer({...})
and child of this list is textarea
xlist.createChild({...})
when window form layout is created I include these precreated objects:
When I double click grid row I populate form fields using "loadRecord()".Code:... items: [ xlist, { xtype:"textfield", id:"ID1", fieldLabel:"Label1", width:"100%" } ]
Everything is fine except for this xlist's child textarea field. It doesn't populate.
Checking in firebug I see that xlist object is not part of the form element, but is child of body element. When window layout is set, why isn't it moved in the dom to the right position? shouldn't it be nested somewhere down there as defined? other objects seem to be.
Thanks!
-
8 Aug 2008 1:50 AM #2
The FormPanel cannot know about it.
The FormPanel only knows about Fields that are in the Container hierarchy underneath it.
Simply creating HTML controls won't add anything to the Form.
But you need to rethink. Layers are for floating elements. What UI interaction are you looking for here?Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
8 Aug 2008 2:39 AM #3
ah, ok... layer is html control and therefore not simply added to the Form.
I am trying to have a combobox with two triggers, one for clasic dropdown list and the other for "textarea dropdown". I went for Layer because it handles shadow and everything, and seemed simple enough.
Idea with this "textarea dropdown" is to allow user to enter some kind of an extra comment.
With Layer I tried to mimic clasic dropdown list.
Any better way to go about it?
Thanks!
-
8 Aug 2008 3:31 AM #4
That's exactly what Ext.form.TwinTriggerField is for.
Undocumented, so use the source.Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
8 Aug 2008 3:49 AM #5
Yes and I am using it.
I just thought that Layer object would be simple enough choice to handle with second trigger. This part is working ok, but problem is that Layer object is not created within the Form where I want it to be and "loadRecord()" method doesn't find it.
I need to play a bit more around it.
-
8 Aug 2008 3:57 AM #6
loadRecord finds the Field
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642


Reply With Quote