PDA

View Full Version : Populating a Panel in a layout.



MarkF
2 Feb 2010, 11:29 AM
Background:
I'm working on an application that is build on ColdFusion 9 which creates "wrappers" for many of the Ext JS controls. Unfortunately, some of the functionality is buggy so I decided to implement some features using the Ext JS controls directly. I'm trying to keep my use of direct Ext JS code to a minimum to avoid future support issues.

Issue:
I'm just starting out with Ext JS and have a question about the Panel control. I have a basic Panel setup using the border layout without any content in the regions. How do I populate a region with content? Let's say I have a DIV with some content, is there any way to populate a region with the content from that DIV?

Mark <><

dawesi
2 Feb 2010, 7:33 PM
Issue:
I'm just starting out with Ext JS and have a question about the Panel control. I have a basic Panel setup using the border layout without any content in the regions. How do I populate a region with content? Let's say I have a DIV with some content, is there any way to populate a region with the content from that DIV?
Mark <><

The Wiki (http://www.extjs.com/forum/../learn/Main_Page)is your friend... especially the FAQ (http://www.extjs.com/forum/../learn/Ext_FAQ)

There are various ways to populate a panel with content. you can use the panel.load() function on a panel or give it a url:'http:///bla' and even autoLoad:true to load html content as the panel renders. If you are looking to load content from other domains, you might want to look at managediframe ux.

I've twoed and frowed between using a cfc and a cfm page for pulling content from the server, each has their own benefits and downsides. Also check out the Ext.direct stuff that Aaron Conran has put together for CF... takes a bit to get your head around it, but you can always ask him questions...

Check out the FAQ and google your questions, is the best way to get started.