Nice,
Thank you Nullity, it was the inclusion order of the Javascript libraries.
Is there a place where these directive are available in the documentation or on the web? I didn't saw that anywhere.
Thanks again,
Francois
Printable View
Nice,
Thank you Nullity, it was the inclusion order of the Javascript libraries.
Is there a place where these directive are available in the documentation or on the web? I didn't saw that anywhere.
Thanks again,
Francois
There is a text file included in the Ext package you download from this site called 'INCLUDE_ORDER.txt'.
Thanks,
Francois
I am a bit confused here as to how to add something other than text or html markup (in this case i want to add a Ext.Toolbar.MenuButton). Can you provide an example of this, or am i just not understanding how this works and this isnt supported?
Well, I mainly created this for text and simple HTML, so that isn't supported directly. However, you can do something like this which works just fine:
As in, use the MiscField to create an empty DIV, then after the form is rendered, create your Ext element and render it to that empty DIV.Code:var form = new Ext.form.Form({
labelWidth: 85
});
form.add(
new Ext.form.MiscField({
fieldLabel: 'MiscField',
id: 'miscfield_button',
width: 160,
value: '<div id="test_button"></div>'
})
);
form.render('myForm');
var myButton = new Ext.Button('test_button', {
text: 'Button'
});
Ok, I was just completely wrong on that one then, thanks.
Now a Button renders fine, but a Toolbar.Button's constructor doesn't take a "renderTo" option. But thats my problem and not yours :)
Just FYI - if all you are after is a menu, the Ext.Button constructor supports a 'menu' option.
Yeah, I did explore that option and it does work, but I dont like the behavior. The problem is that the button's main handler is called even when clicking on the menu expander portion of the button. What I really am after is the toolbar's SplitButton.
I have been doing just this [adding a div I render a button to afterward], and it works well.
I know it's a topic beat to death, but the fine-grained control
over placement of form controls is the one thing I miss in Ext.
I still not going back, tho. :D
--dan
Well dont I feel like a tool, theres a Ext.SplitButton right there waiting for me to use it :)
I did have to make a small modification though, to prevent the button from being wiped out with a form.reset():
(new config option disableReset)PHP Code:/**
* Resets the current field value to the originally-loaded value
*/
reset : function(){
if (!this.disableReset){
this.setRawValue(this.originalValue);
}
},
Perhaps there is a better way to do this but for now this works for me.