1. #1
    Sencha User
    Join Date
    Sep 2013
    Posts
    67
    Vote Rating
    2
    maecy is on a distinguished road

      0  

    Default Unanswered: Cannot get selected item in grid

    Unanswered: Cannot get selected item in grid


    I cannot get the data from the selected grid cell. It was working before, I didn't change any of my code inside the method but I keep getting this error:

    erroooorr.jpg

    Here's my createPlaylist method where I get the error:

    Code:
    createPlaylist:function(record){		var scope = this;
    		var vo = record;
    		var sel = scope.getShowImages().getSelectionModel().getSelection();
    		var user = scope.getProfinfo().getForm().getValues();
    		var filename = sel[0].data.filename;
    		var imageid = sel[0].data.image_id;
    		var ref_num = sel[0].data.ref_num;
    		var transition = scope.getTransitions().getValue();
    		var time = scope.getTime().getValue();
    		var date = new Date();
    		var playlistid = scope.getRndInt().getValue();
    		var sel2 = scope.getTerminalGrid().getSelectionModel().getSelection();
    		var terminals = sel2[0].data;
    		
    	
    		
    		Ext.Service.invoke(
    			'PlaylistManager',
    			'saveplaylistdetails',
    			[user.id,filename,imageid,transition,time,date,playlistid,ref_num],
    			function(p){
    				console.log('eto ang p',p)
    				if(p.success){						
    					Ext.Msg.alert('dlti', p.result[0].message);	
    					scope.getPlaylistDetailsGrid().show();
    					scope.getTransitions().reset();
    					scope.getTime().reset();
    					
    					
    					scope.getAllowedtime().setValue(terminals.num_of_spots*30);
    					var staytime = scope.getAllowedtime().getValue();
    					scope.getTime().setMaxValue(staytime);
    					
    						Ext.Service.invoke(
    							'PlaylistManager',
    							'getstaytime',
    							[user.id,imageid,playlistid],
    								function(p1){
    									scope.getAccumulatedtime().setValue(p1.result);
    									var totalacc = scope.getAccumulatedtime().getValue();
    									var totalavl = staytime - totalacc;
    									scope.getTime().setMaxValue(totalavl);
    									scope.getTotalAvailabletime().setValue(totalavl);
    									scope.getThumbnailPopup().hide();
    									}
    								);
    								
    				}else{	
    					//scope.getThumbnailPopup().hide();
    					Ext.Msg.alert('Error', 'Please check your inputs.');
    					scope.getPlaylistDetailsGrid.show();
    					}
    					
    	
    				
    			});
    		
    		},
    Could anyone please help me find the error?
    Attached Images

  2. #2
    Sencha User
    Join Date
    Nov 2013
    Posts
    162
    Answers
    1
    Vote Rating
    -1
    xjscrafter has a little shameless behaviour in the past

      0  

    Default


    So it seems this line is not returning the selection:

    Code:
    var sel = scope.getShowImages().getSelectionModel().getSelection();
    You say this was working before and no code has changed. How about your steps to reproduce, are you doing anything differently?

  3. #3
    Sencha User
    Join Date
    Sep 2013
    Posts
    67
    Vote Rating
    2
    maecy is on a distinguished road

      0  

    Default


    What do you mean in my steps to reproduce?

  4. #4
    Sencha User
    Join Date
    Nov 2013
    Posts
    162
    Answers
    1
    Vote Rating
    -1
    xjscrafter has a little shameless behaviour in the past

      0  

    Default


    You say it was working before, and now its not working, but you didn't change anything. Sometimes this can happen if what we do in the UI is slightly different. That is what I mean by steps to reproduce. Are you doing exactly the same thing in the UI? If so, could this be a caching problem?

  5. #5
    Sencha User
    Join Date
    Sep 2013
    Posts
    67
    Vote Rating
    2
    maecy is on a distinguished road

      0  

    Default


    Yes. It's the same as the UI. I really have no idea. I tried to replace my codes with the old one (my backup) but it returns the same error.

Thread Participants: 1

Tags for this Thread

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