-
11 Oct 2012 1:16 AM #1
Answered: Combobox use of afterBodyEl, afterLabelTextTpl
Answered: Combobox use of afterBodyEl, afterLabelTextTpl
Hi,
I tried to used afterBodyEl, afterLabelTextTpl, etc. without success.
I have save my attempt here http://jsfiddle.net/EFFMA/
Has someone already used those properties with success ?
Thanks
-
Best Answer Posted by mitchellsimoens
Looking at the source, in order for afterBodyEl to be used you must have msgTarget = 'side':
Also the afterLabelTextTpl is also showing up in this simple test using 4.1.2Code:var states = Ext.create('Ext.data.Store', { fields : ['abbr', 'name'], data : [ {"abbr" : "AL", "name" : "Alabama"}, {"abbr" : "AK", "name" : "Alaska"}, {"abbr" : "AZ", "name" : "Arizona"} ] }); Ext.create('Ext.form.ComboBox', { fieldLabel : 'Choose State', store : states, queryMode : 'local', displayField : 'name', valueField : 'abbr', afterBodyEl : 'Test', msgTarget : 'side', afterLabelTextTpl : 'Test 2', renderTo : Ext.getBody() });
-
15 Oct 2012 8:16 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
- Answers
- 3111
Looking at the source, in order for afterBodyEl to be used you must have msgTarget = 'side':
Also the afterLabelTextTpl is also showing up in this simple test using 4.1.2Code:var states = Ext.create('Ext.data.Store', { fields : ['abbr', 'name'], data : [ {"abbr" : "AL", "name" : "Alabama"}, {"abbr" : "AK", "name" : "Alaska"}, {"abbr" : "AZ", "name" : "Arizona"} ] }); Ext.create('Ext.form.ComboBox', { fieldLabel : 'Choose State', store : states, queryMode : 'local', displayField : 'name', valueField : 'abbr', afterBodyEl : 'Test', msgTarget : 'side', afterLabelTextTpl : 'Test 2', renderTo : Ext.getBody() });Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
9 Jan 2013 5:14 AM #3


Reply With Quote