View Full Version : KitchenSink initial launchscreen

2 Jul 2010, 3:56 AM
I realise you'll be changing and finalising the UniversalUI class in due course, but in the meantime I'm trying to understand how to create my own temporary customised version. Specifically, the KitchenSink example has a fixed launchscreen, defined by the html property within the items, ie:

Ext.ux.UniversalUI = Ext.extend(Ext.Panel, {
fullscreen: true,
layout: 'card',
items: [{
cls: 'launchscreen',
html: '<div><img src...etc

I'm trying to figure out how I could make the html dynamic so I can fetch it via Ajax, but drawn a blank so far. Anyone got any suggestions?

Many thanks

2 Jul 2010, 11:26 AM
We are planning on adding an autoLoad option of some kind on any Component to load its content thru Ajax. In the meantime you can make an ajax call to any serverside source using Ext.Ajax.request. You can find it in the docs. Then in the callback you can either update the contents of an existing component using the update() method (will probably look something like mypanel.update(response.responseText)). You could also instantiate and add the component with the content in the callback method.

One example that I can think of is the source panel inside the kitchensinks index.js file. There we actually dynamically load the contents of javascript files into the source panel. You could have a look at that.