Results 1 to 5 of 5

Thread: How to populate dynamic text from xmlreader into label

  1. #1
    Ext User
    Join Date
    Feb 2009
    Posts
    8
    Vote Rating
    0
      0  

    Default 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

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    3
      0  

    Default

    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.

  3. #3
    Ext User
    Join Date
    Feb 2009
    Posts
    8
    Vote Rating
    0
      0  

    Default

    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'});

  4. #4
    Ext User
    Join Date
    Feb 2009
    Posts
    8
    Vote Rating
    0
      0  

    Default

    In above code I'm not sure how to read variable for xtype:label.

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    So you want to display static loaded info? I would recommend using a read-only field or a StaticTextField (user extension).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •