1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    56
    Vote Rating
    0
    dev_java is on a distinguished road

      0  

    Post Form Panel : Load Record and show the data in form label

    Hi,


    When data is loaded to the form using loadRecord(), the label field in the Form Panel is not reflecting the data, whereas the text field is reflecting the values. Can any one help me on this.

    Alarm Details button code:

    Code:
     tbar:[
            {
            	text:'   Alarm Details   ',
            	id:'alarmTool',
            	listeners  : 
                {
            		'click' : function ()
            		{
            	
            	var neAlarmDetails = new alarmDetails();
            	var record = Ext.getCmp('alarmgrid').getSelectionModel().getSelected();
            	neAlarmDetails.getForm().loadRecord(record);
    
            	var alarm_Details = new Ext.Window({
            	            title: 'Alarm Details  ',
            	            closable:true,
            	            id:'alarm_Details',
            	            width:560,        	          
            	            height:400,
            	            plain:true,
            	            layout: 'fit',
            	            items: [neAlarmDetails]
    
            	        });
            	alarm_Details.show();
            		}
                }
            	
            }
    FormPanel code

    Code:
    var alarmDetailsPanel = {
    
    		
            xtype: 'fieldset',
            defaultType: 'label',
            title:'Fault Details',
            layout:'column', 
             border:true,
           
            items: [
            	
                {          
                   
                    text: 'Event No :',
                    columnWidth: .20,
                    height:20              
                  
                    
                },{ 
                	
                    name: 'eventid',
                    text:'id',
                	columnWidth: .17,
                	
                    height:20,
                  
                },
               {     
    			xtype: 'label',
    			columnWidth: .17,
    			name: 'eventNo',
    			text: 'Remarks :', 
    			height:'20',
    			     
               },
    	  {     
    			xtype:'textfield',				
                            name: 'severity',
                            columnWidth: .80
               } 
    ]
    };
    alarmDetailsPanel are added to a FormPanel where the record is being loaded.

    Any Suggestions !!

    Thanks

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    116
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default

    A label isn't a field (e.g. it doesn't have a 'name' config option).

    You should be using a displayfield.

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Posts
    56
    Vote Rating
    0
    dev_java is on a distinguished road

      0  

    Post

    Hi Condor,

    Thanks for the reply.

    I tried giving like this...

    Code:
    { 
         displayField: 'severity',
         columnWidth: .17,    
         height:20,              
    },
    But it does not work. Still its not giving the value of severity in the record. Its just displaying empty . ANy thing to do with text option?

    Thanks

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    116
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default

    No, that should be:
    Code:
    { 
      xtype: 'displayfield',
      name: 'severity',
      columnWidth: .17,
      height:20
    },

  5. #5
    Sencha User
    Join Date
    Jun 2010
    Posts
    56
    Vote Rating
    0
    dev_java is on a distinguished road

      0  

    Default

    Thanks Condor.. It works fine

  6. #6
    Sencha User
    Join Date
    Sep 2015
    Posts
    1
    Vote Rating
    0
    kamal14591 is on a distinguished road

      0  

    Default

    Hello,I am creating window and in that window i am using xtype:'form'. Actually i want to know how to load data in that form from store???

Similar Threads

  1. Record mapping data from JSON in form panel
    By richardwyke in forum Ext 3.x: Help & Discussion
    Replies: 0
    Last Post: 18 Jul 2009, 8:38 AM
  2. Show form fields as a label
    By Dave.Sanders in forum Ext 2.x: User Extensions and Plugins
    Replies: 1
    Last Post: 18 Mar 2009, 9:24 PM
  3. form.load show json response instead of form
    By Slapyo in forum Ext 2.x: Help & Discussion
    Replies: 14
    Last Post: 28 Feb 2009, 6:48 AM
  4. show load mask before form panel is completed?
    By kohyea in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 9 Jan 2009, 8:16 AM
  5. How load data into form panel??
    By beatlecesar in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 15 Jul 2008, 1:05 AM

Thread Participants: 2