-
20 Feb 2009 3:37 PM #1
How to populate dynamic text from xmlreader into label
How to populate dynamic text from xmlreader into label
I'm trying to read xmlreader's value into label, but don't know how to do it

-
20 Feb 2009 3:43 PM #2
Please read http://extjs.com/learn/Ext_Forum_Help
Have you written any code, or do expect someone to just give it to you?
Show what you have so far. If you can't show that you're reading data into a xmlreader and displaying a textfield, you're not going to get much help.
If you don't understand how to get a value from the xmlreader, I suggest you spend some time reading the API and also the grid FAQ.Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
20 Feb 2009 3:49 PM #3
I'm trying with following code.
Code:var testForm = new Ext.FormPanel({ id: 'test', frame: true, labelAlign: 'left', title: 'Test', bodyStyle:'padding:5px', reader : new Ext.data.XmlReader({ record : 'test_info', success: '@success' }, [ 'param1','param2','param3' ]), errorReader: new Ext.form.XmlErrorReader(), items: [{ xtype: 'fieldset', defaults: {width: 180}, // Default config options for child items defaultType: 'textfield', autoHeight: true, border: false, items: [{ fieldLabel: 'Test1', name: 'param1', },{ fieldLabel: 'Action', name: 'param2', }, { xtype: 'label', name: 'param3', } ] }], }); testForm.load({ url:'somefile.php', waitMsg:'Loading'});
-
20 Feb 2009 4:04 PM #4
In above code I'm not sure how to read variable for xtype:label.
-
20 Feb 2009 11:51 PM #5Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
So you want to display static loaded info? I would recommend using a read-only field or a StaticTextField (user extension).


Reply With Quote