1. #11
    Sencha User
    Join Date
    Jun 2008
    Location
    Netherlands, Den Bosch
    Posts
    24
    Vote Rating
    0
    RC_ants is on a distinguished road

      0  

    Default


    I have the same problem with a working other example that does reset. Both are in the same code base and work both in IE as well as FF.

    Their is only 1 difference and that's that the not working one is set with loadRecord() instead of hand typed. I have been able to determine that when I do no loadRecord() on the form that it does reset.

    Here is a test case, but it doesn't trigger the problem here. I have tested it in a different Ext version then the code base that run in to the problem on. I'll keep searching.

    Code:
    	var store = new Ext.data.SimpleStore({
    	  fields: ["abbr", "state"],
    	  data : ["AsfsdfssLfsfsfsfs", "Alabafxfsddfsdfsdfsfsfsfsma"]
    	});
    	var record=store.getAt(0);
    
    	var statePanel=new Ext.form.FormPanel({
    		height: 200,
    		width: 300,
    		items:
    		[
    			new Ext.form.TextField({
    				name: "state",
    				fieldLabel: "state"
    			})
    		],
    		buttons:
    		[
    			loadRecord=new Ext.Button({
    				text: "load record"
    			}),
    			resetForm=new Ext.Button({
    				text: "reset"
    			})
    			
    		]
    	})
    	var testBox=new Ext.Window({
    		title: "test",
    		//layout: "border",
    		x: 2,
    		y: 2,
    		renderTo: document.body,
    		items:
    		[
    			statePanel
    		]
    	});
    
    	var start=function(){
    		statePanel.getForm().loadRecord(record);
    		testBox.show();
    	}
    
    	resetForm.on("click", function(){
    		statePanel.getForm().reset();
    	}, this);
    
    	
    	loadRecord.on("click", function(){
    		list=store.getRange();
    		alert(list[0].get("state"));
    		statePanel.getForm().loadRecord(record);
    	}, this);
    
    	Ext.onReady(start);

  2. #12
    Sencha User
    Join Date
    Sep 2012
    Posts
    1
    Vote Rating
    0
    steam is on a distinguished road

      0  

    Default I used 'Ext.getCmp' to solve it , set the form a id name .

    I used 'Ext.getCmp' to solve it , set the form a id name .


    Code:
    Ext.getCmp('FormPanelId').getForm().reset();

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar