1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    83
    Vote Rating
    0
    lkasdorf is on a distinguished road

      0  

    Default combobox in popup win works first time only

    combobox in popup win works first time only


    I have a window that I pop up which contains a formpanel which contains 2 comboboxes. The comboboxes each use a Store that I load from php at startup.

    It works fine the first time I pop up the window. The second time I pop the window, the comboboxes are empty. What is confusing is that the stores still have their required data when the window opens the 2nd time. There must be some difference- I just have not spotted it yet.

    Code:
    var absWin = null;
    function doAbstractWindow(grid, rowIndex, cellIndex, e)
    {
    
    	var recData = gContextRecord.data;			
    
        //if(!absWin)
    	if (true)
    	{
            absWin = new Ext.Window({
                layout:		'fit'
    			,modal:		true
    			,shadow:	true
                ,width:		550
                ,height:	500
                ,closeAction:'hide'
    			,title:		"Abstractor Info for File " + gContextRecord.data.fileNumPrefix + gContextRecord.data.fileNum
                ,plain: 	false
    			,style:"background-color:white;"
                ,items:		
    			{	xtype:"form"
    				,id: 'absForm'
    				,header:false
    				,labelWidth:290
    				,style:"padding:10px;background-color:white;"
    				,border:false
    				,hideBorders:true
    
    				,items:[
    					{xtype:"hidden", name:"userId"}
    
    					,{xtype:"combo"  
    					,hiddenName:"formLetter" 
    					,id:"letterComboId"
    					,fieldLabel:"Choose a Letter" 
    					,store: dsLetter 
    					,mode:'local' 
    					,displayField:'name' 
    					,valueField: 'formletterId'
    					,triggerAction:'all' 
    					,width:200
    					,forceSelection:true
    					,listeners: {select:function(thisCombo, letterRec, idx) 
    					{
    						loadEmailBody(letterRec, null);
    					}}
    					,baseCls:"margin:20px"
    					}
    
    					,{xtype:"combo"  
    					,hiddenName:"company" 
    					,id:"abstractorComboId"
    					,fieldLabel:"Choose an Abstractor" 
    					,store: dsAbs 
    					,mode:'local' 
    					,displayField:'company' 
    					,valueField: 'userId'
    					,triggerAction:'all' 
    					,width:200
    					,forceSelection:true
    					,listeners: {select:function(thisCombo, absRec, idx) 
    					{
    						var theForm = thisCombo.ownerCt.form;
    						theForm.setValues(absRec.data);
    						loadEmailBody(null, absRec);
    					}}
    					,baseCls:"margin:20px"
    					}
    
    					,{xtype: "textfield"
    					,fieldLabel:"Abstractor Email Address" 
    					,width: 200
    					,name:"email"
    					}
    
    					,{xtype:"htmleditor"
    					,name:"emailBody"
    					,id:"emailBodyId"
    					,hideLabel:true
    					//,width:400
    					,height:120
    					}
        
    
    					]
    			}
                ,buttons: [
    				{text:"Send Abstract Request"
    				,name:"sendEmail"
    				,handler: function()
    					{  alert("Send Abstract Request");
    						// we also need to save the abstractor setting here
    					}
    				}
    				,{text:'Cancel', handler:function(){	absWin.hide();} }
    				,{text:'Save', handler:function(e){ absWin.hide(); }}      
    			]}
    		);
    	}
    	absWin.show();
    }	// end doAbstractWindow
    Any ideas?
    Sorry for the formatting when I paste it in here...

  2. #2
    Sencha User
    Join Date
    Apr 2008
    Posts
    2
    Vote Rating
    0
    bstoppel is on a distinguished road

      0  

    Default C is null

    C is null


    I am having the same problem. I am rendering from an HTML select element, though. Here is my Firebug output.

    error on line 129 of ext-all.js

    C is null

    initComponent()ext-all.js (line 129)
    Component(Object hideLabel=true name=listSort xtype=combo)ext-all.js (line 58)
    apply()ext-base.js (line 9)
    apply()ext-base.js (line 9)
    apply()ext-base.js (line 9)
    apply()ext-base.js (line 9)
    apply()ext-base.js (line 9)
    ComponentMgr(Object hideLabel=true name=listSort xtype=combo, "textfield")ext-all.js (line 57)
    initComponent(Object hideLabel=true name=listSort xtype=combo)ext-all.js (line 64)
    initComponent(Object hideLabel=true name=listSort xtype=combo)ext-all.js (line 64)
    initComponent(Object hideLabel=true name=listSort xtype=combo)ext-all.js (line 64)
    initComponent(Object hideLabel=true boxLabel=Inmate List name=list)ext-all.js (line 64)
    initComponent()ext-all.js (line 64)
    initComponent()ext-all.js (line 76)
    Component(Object title=Print Facility Info autoHeight=true)ext-all.js (line 58)
    apply()ext-base.js (line 9)
    apply()ext-base.js (line 9)
    apply()ext-base.js (line 9)
    apply()ext-base.js (line 9)
    PrintFacilityDialogPanel(Object facility_id=2 win=Object)print-facility-di... (line 60)
    printFacility()facility-panel.js (line 112)
    initComponent(Object browserEvent=Event mouseout button=0 type=mouseout)ext-all.js (line 87)
    EventManager()ext-all.js (line 13)
    getViewWidth()

  3. #3
    Ext User
    Join Date
    Jul 2007
    Posts
    83
    Vote Rating
    0
    lkasdorf is on a distinguished road

      0  

    Default got it to work without lazy instantiation

    got it to work without lazy instantiation


    What I did to get it to work is to not create the combo boxes and the window using lazy instantiation. I create them at load time. Longer loading, but the window comes up faster, and the combos work.

    I would like to understand why my lazy way fails tho.

  4. #4
    Ext User
    Join Date
    Apr 2008
    Posts
    2
    Vote Rating
    0
    scsi is on a distinguished road

      0  

    Default problems with windows loaded more than one time

    problems with windows loaded more than one time


    i think i have the same problem too and i analysed a few minutes.

    problems with windows loaded more than one time with custom field "id" on components (mainly scroll bars)

    a window containing scrollbars with "id" filled by myself can be launched few times in a html page...
    the 1st time all is fine
    the 2nd time the scroll bar has sometimes an already the selected value, and there is no choice available if i try to change it
    it makes the validation to fail too
    thje problem seems to coem from the "id" field filled

    more than one object can or should not have the same "id"
    i tried to destroy() the window or the component but it makes the page to bug

    is it incompatible to use customised "id" fields values with, same time, a recurrent window, in the same html page ?

  5. #5
    Ext User
    Join Date
    Jul 2008
    Posts
    41
    Vote Rating
    0
    napolux is on a distinguished road

      0  

    Default


    Same problem here: C is Null :P when we use a combobox in a editordatagrid contained in a window that we popped out

  6. #6
    Ext User
    Join Date
    Jul 2008
    Posts
    41
    Vote Rating
    0
    napolux is on a distinguished road

      0  

    Default


    Solved, but with a dirty trick. :P

Thread Participants: 3

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi