View Full Version : generating extjs code on the server side

25 Oct 2010, 2:21 AM
i need to write my extjs code dynamically.

it's like this.

for example i am creraing my proxy code at JSP

String proxy = " new Ext.data.HttpProxy({ url: 'usergrid.jsp?op=getGridData'}) "
String reader ="bla bla";

out.println("extcode as JSON");

and Javascript will be like this;

var proxy = firstStore.getAt(0).get('proxy');

var reader = firstStore.getAt(0).get('reader');

var store = firstStore.getAt(0).get('store');

could you help me with this. as you see i just need to send a text to js and use that text as js code dynamically.

25 Oct 2010, 2:35 AM
You don't need a store for that!

Ext.Loader (src/ext-core/ext-core/src/Loader.js) can load and execute javascript dynamically.