View Full Version : Injecting pure HTML into ExtJS-structure?

21 Feb 2010, 10:39 PM
Hello everyone,

can anyone tell me whether it is possible to inject some HTML-code or DOM-nodes into ExtJS-structure in order to use them as if they were initially created as ExtJS components?

Let's say we have a
var test = '<input type="text" name="test" id="test"/><input type="text" name="test1" id="test1"/>'; How to add these test and test1 elements to FormPanel instance in order to use them as if they were {xtype: 'textfield'} from the beginning? Is there a way?

Thanks in advance!

21 Feb 2010, 11:20 PM
I have difficulties to foreseen the goal of this...

22 Feb 2010, 2:51 AM
The goal of this is to let HTML-coder to do his work with HTML-templates and then transform these templates into ExtJS-model.

22 Feb 2010, 2:58 AM
You are barking up the wrong tree.

"HTML coder"? They don't exist.

There's no point sending an HTML "picture" of an application down the wire, and then, after it arrives, fiddling and faffing around with it in complex Javascript to try to activate it and make it looks nice, and work dynamically.

Just write an Ext UI.

22 Feb 2010, 3:08 AM
No, I'm not trying to convert the whole HTML-document to an ExtJS-interactive application. There are some small templates of forms that are much simplier to generate using server-side logic + template engine than to double the logic on client-side.

22 Feb 2010, 3:12 AM
Well, since Ext just creates fancy HTML, what is your problem? You have an HTML page and want to do something with it? Just Do It.

22 Feb 2010, 6:49 AM
The problem is that those templates just return a part of the form, another part of which consists of ExtJS components.
BTW, doubled the logic and implemented the whole thing with ExtJS. So the thread might be closed, anyway thanks! B)