Results 1 to 4 of 4

Thread: no one answer

  1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    7
    Vote Rating
    0
      0  

    Default no one answer

    hi

    im a new user of ExtJs in past i wrote 3 thread before this and i didnt have any answere. luckly ive resolved the issue but i waste much much time.
    now i have another problem and i hope that someone here can help me coz really i dont know why it doesnt work.

    i can't populate my gridpanel with dwr.
    the calling of dwr class works and it retrive the data from the db but i dont know why my gridpanel is always blank.

    this is my code of js file
    Code:
    Ext.onReady(function(){
    	
    	 Ext.BLANK_IMAGE_URL = '/scripts/ext/resources/images/default/s.gif';
    	 
    	 var cmGrid = new Ext.grid.ColumnModel( [ 
    		{
    				header : 'idTicket',  //getJsResource('panel.ticket'),
    				width : 50,
    				fixed : true,
    				dataIndex : 'idTicket',
    				align : 'center',
    				hideable : false
    		 },
    		 {
    				header : 'stato',//getJsResource('panel.criticita'),
    				width : 50,
    				fixed : true,
    				dataIndex : 'stato',
    				align : 'center',
    				hideable : false
    		 }
    		 
    	]);
    	
    	 cmGrid.defaultSortable = true;
    	
    	/*-----------FINE COLUMN MODEL PER LA GRID--------*/
    	 
    	 
    	 var dsGrid = new Ext.data.Store({
    	      proxy     : new Ext.data.DWRProxy(true, DWRTicket.getElencoTicket, [  'unita'
    	                                                                      , 'dataInizio'
    	                                                                      , 'dataFine'
    	                                                                      , 'stato'
    	                                                                            ])
    	     ,listeners : {'beforeload': function(dataProxy, params)
    									 {
    										params.unita = 'DP6NU6';
    										params.dataInizio = '01/01/2010';
    										params.dataFine = '03/09/2010';
    										params.stato = 'AP';
    									 }
    		
    					  } 
    	     ,reader    : new Ext.data.ListRangeReader( {id:'idTicket', totalProperty: 'totalSize'}, cmGrid)
    	     ,remoteSort: true
    	     ,baseParams: {limit: 100}
    	   });
    	 
    	 dsGrid.load({
    			
    			params : {
    			unita : 'DP6NU6'
    		   ,dataInzio: '01/01/2010'
    		   ,dataFine:  '03/09/2010'
    		   ,stato:  'AP'
    			}
    			});
    	 
    	 var grid =  new Ext.grid.GridPanel({
    			id              : 'panelGrid'
    			,store           : dsGrid
    			,cm              : cmGrid
    			,loadMask        : true
    			,stripeRows      : true
    			,height          : '100%'
    			,layout          : 'fit'
    			,bbar:         new Ext.PagingToolbar({
    	            pageSize:     dsGrid.baseParams.limit,
    	            store:        dsGrid,
    	            displayInfo:  true,
    	            displayMsg:   'risultati trovati {0} - {1} di {2}',
    	            emptyMsg:     "nessun risultato trovato"
    	         })
    			,autoExpandMin   : 100
    			,viewConfig      : { forceFit: true
    			        , frame   : true
    			        }
    	});
    	 grid.store.load({
    			params: ({
    			purge: true
    			,start: 0
    			})
    		});
    	 grid.render('treeUnita');
    });
    this is the dwr method that retrive the data
    Code:
    public ListRange<TicketAT> getElencoTicket(String unita,String dataInizio,String dataFine,String stato) 
    	{
    	    System.out.println("SONO DENTRO");   
    	    
    	    List<TicketAT> t = new DaoTicket().getListaTicketByUnita(unita, dataInizio, dataFine, stato);
    	    int i;
    	    for( i=0; i < t.size(); i++)
    	    {
    	    	System.out.println("idTicket: " + t.get(i).getIdTicket() + "    Stato: " + t.get(i).getStato());
    	    }
    		
    		System.out.println("i: " + i);
    		return new ListRange<TicketAT>(t);
    	}
    any one can tell me why the gridpanel is always blank?
    thank you so much

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    132
      0  

    Default

    Start debugging.
    - Is the request sent?
    - Is the response received?
    - Does the store load event fire?
    - Does the store loadexception event fire?

  3. #3
    Ext User
    Join Date
    Jul 2010
    Posts
    7
    Vote Rating
    0
      0  

    Default

    thanks for your answer
    Code:
      proxy     : new Ext.data.DWRProxy(true, DWRTicket.getElencoTicket, [  'unita'
    	                                                                      , 'dataInizio'
    	                                                                      , 'dataFine'
    	                                                                      , 'stato'
    	                                                                            ])
    putting false instead of true on the grid panel appears only one record.
    now im going to debugging.

  4. #4
    Ext User
    Join Date
    Jul 2010
    Posts
    7
    Vote Rating
    0
      0  

    Default

    thanks for your answer
    Code:
      proxy     : new Ext.data.DWRProxy(true, DWRTicket.getElencoTicket, [  'unita'
    	                                                                      , 'dataInizio'
    	                                                                      , 'dataFine'
    	                                                                      , 'stato'
    	                                                                            ])
    putting false instead of true on the grid panel appears only one record.
    now im going to debugging.

Similar Threads

  1. Some variables from the server answer?
    By Alien in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 2 Feb 2010, 8:01 AM
  2. probably an easy answer...
    By arthurakay in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 9 Dec 2008, 11:32 AM
  3. EASY answer, I hope
    By wmeitzen in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 29 Nov 2008, 10:20 PM
  4. Can you answer my question?.
    By pokerking400 in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 23 Oct 2008, 11:06 AM
  5. Answer for gurus
    By TheItalianJob in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 11 Jan 2008, 11:38 AM

Posting Permissions

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