View Full Version : Appending javascript/html function in a extjs window

25 Nov 2014, 1:51 AM
I have the following problem:

I made a simple Extjs application, this application opens a window when a button is pressed. No i want to display in that window a tree made out of json(fixed this with jqtree that applies the tree in a html page). How do i do this? So i want in a window or a panel the tree that jqtree makes in html. Hope u can help me

25 Nov 2014, 11:52 AM
It sounds like what you're wanting to do is render a treepanel to the Ext window component, is that correct?

The treepanel's store will commonly consume a hierarchal JSON object to render the tree nodes.

27 Nov 2014, 1:53 AM
To anwser the question, no i don't want a treepanel because i have to modify the json stored procedure(and i have no access to that). I use the javascript library named JSON tree builder(you can find it here: https://github.com/tamirs9876/JSON.Tree.Builder). That library prints the json data as i want it and now i want to paste the outcome(html code) in the extjs window when a button is pressed.

1 Dec 2014, 1:45 PM

While we don't support the third party software per se, you can use the windows's html (http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.window.Window-cfg-html) config or its update() (http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.window.Window-method-update) method to update the window body with your own html as needed at runtime.