-
16 Apr 2008 3:25 AM #81
-
16 Apr 2008 3:27 AM #82
-
16 Apr 2008 3:28 AM #83
The tbar of the designer looks something like this.
PHP Code:tbar : [{
text : 'Save',
tooltip : 'Save the design file',
iconCls:'icon-save',
disabled : true,
id : this.FBSaveBtn,
handler: function() {this.saveConfig},
},{
text : 'Reload',
iconCls:'icon-reload',
tooltip : 'Reload the design file',
handler: function (){
this.markUndo("Reload");
this.loadConfig();
Ext.getCmp(this.FBSaveBtn).disable();
}
}]
-
16 Apr 2008 3:49 AM #84
-
16 Apr 2008 4:24 AM #85
-
16 Apr 2008 4:40 AM #86
it's ok thanks.
it's ok thanks.
Funny thing.
I finally gave up and started from other direction.
I took the "complex layout"-example and started modifying the code and voila, the accordion works exactly as it is supposed to.
So there is big difference if the ui is created purely with code or from json.
For some reason I cannot achieve the same behaviour with GuiDesigner.
So I'll go with what works.
You should maybe not waste your time on this, except if you really want to know
how the tool Generated code behaves differently from the one that is in "complex layout".
thanks,
Petri.
-
16 Apr 2008 5:12 AM #87
-
16 Apr 2008 5:49 AM #88
OK, take a look
OK, take a look
So this is a clip which shows how the accordion wont fill the container area:
http://www.wainotar.com/siirto/accordion.wmv
I've tried all sorts of thinkable and unthinkable attributes and no result, until I started creating accordion by code like in the Complex-example.
here's a very short clip of the structure that I'm trying to achive: (this is the dojo version)
http://www.wainotar.com/siirto/jesblack.wmv
petri.
-
16 Apr 2008 10:08 AM #89
Thanks for your video. It made the problem clear i made a JSON that shows that it works, but you have to remove property autoHeight. This causes your problem. In next release we added this option to wizard
Sierk
And then use the following JSON to see that it works:
PHP Code:{
layout:"accordion",
xtype:"panel",
title:"Accordion",
defaults:/*BEGIN*/{html: '<empty panel>', bodyStyle:'padding-top:20px; text-align:center;font-style:italic;color: gray;font-size:11px;'}/*END*/,
items:[{
title:"Panel 1"
},{
title:"Panel 2"
},{
title:"Panel 3"
},{
title:"Panel 4"
}],
window:{
height:500
}
}
-
16 Apr 2008 10:41 AM #90
Works, thank you.
Works, thank you.
It works.
thank you very much Sierk.
I hate to ask you, but I spent this afternoon and evening (it's 21.40 here in Finland now)
searching for a clear and concise example on how to use the generated Json files properly in the context of an application.
... needles to say that I found none.
I have two basic use cases:
1. At application init create needed panels and such.
" this is easy, just copy the generated code json literally to the constructor call ".
... and assignt it to what ?
... and what if I'd rather have the json files in separate files, how would I suck them in ?
... which portion of files (just the items, or all of it ?)
2. Dynamically, after a click on a button, load some form and display it on the ui
- simple setup :
two panels on borderlayout, first one having two buttons and the other panel, well, just lying there , empty.
- user clicks on first button: load the contents of "panel1.json" in the place of the original panel2
- user clicks on button two: load the contents of "panelx.json" in the place of original panel2
To me these use cases represent the basics of form handling in web applications.
Sorry for being a little thick, but I just can't get a clear picture from the docs that are available.
If you describe the steps to me (or even better, show me a working example) I will promise to make screencams out of the solutions and post them for future generations .
Petri.



Reply With Quote