1. #21
    Ext JS Premium Member
    Join Date
    May 2007
    Location
    London
    Posts
    194
    Vote Rating
    0
    Rowan is on a distinguished road

      0  

    Default


    Just wanted to say this has been a great help to us while using DWR - made a few changes but its a great piece of code

  2. #22
    Ext User
    Join Date
    Jul 2007
    Posts
    6
    Vote Rating
    0
    mrtwism is on a distinguished road

      0  

    Default


    I'm having problems getting your DWRProxt to work with grid paging. It looks like you added "arg" as an argument to the load method of the data source and no value is passed in to this argument when I try to load a new page. I do want to pass in an argument but don't know how to tell the pagingFooter to pass it. Any clue on what I can do here?

  3. #23
    Ext User
    Join Date
    Aug 2007
    Posts
    17
    Vote Rating
    0
    Bharani is on a distinguished road

      0  

    Default load without args

    load without args


    can this help
    if(!arg.arg) {
    arg.arg=['your argument',true];
    }
    inside the load method? the params object already has the limit and start variable from the paging toolbar.

  4. #24
    Ext User
    Join Date
    Sep 2007
    Posts
    1
    Vote Rating
    0
    lanceChen is on a distinguished road

      0  

    Question No records found

    No records found


    Hi,
    I modified the sample to work in my own sample, but there is no record back. Here is part of my code.
    Code:
    		 var recordType = Ext.data.Record.create([   
    						{name:'ISBN',mapping:'ISBN', type:'string'},	
    						{name:'author',mapping:'author', type:'string'},	
    						{name:'category',mapping:'category',type:'string'},	 
      		                                {name:'id', type: 'int'},
    						{name:'intro',mapping:'intro', type:'string'},
    						{name:'lastupdate',mapping:'lastupdate', type:'int'},	                
    						{name:'name', mapping:'name', type:'string'},
    						{name:'publisher',mapping:'publisher', type:'string'},		
    						{name:'topic', mapping:'topic',type:'string'}
    					]);
    
    		  ds = new Ext.data.Store({
    		    proxy: new Ext.data.DWRProxy(bookAdaptor.findAllBooks, true),
    		    reader: new Ext.data.ListRangeReader( 
    					{totalProperty:'totalSize'}, recordType),
    		    remoteSort: true
    		  });
    
    	function getColumnModel() {
    		if(!columnModel) {
            columnModel = new Ext.grid.ColumnModel([
    			{ id:"name", header: "Book Name", width: 75, sortable: true,  dataIndex: 'name'},
    			{ id:"author",header: "Author", width: 75, sortable: true,  dataIndex: 'author'},
    			{ id:"topic", header: "Topic", width: 75, sortable: true,  dataIndex: 'topic'},
    			{ id:"category", header:"category", width:75, sortable: true, dataIndex: 'category'},
    			{ id:"intro", header:"intro", width:75, sortable: true, dataIndex: 'intro'}
    		]);					
    		}
    		return columnModel;
    	}
    The response from server is like the following
    Code:
    var s0=[];var s1={};var s2={};var s3={};var s4={};var s5={};var s6={};s0[0]=s1;s0[1]=s2;s0[2]=s3;s0[3
    
    ]=s4;s0[4]=s5;s0[5]=s6;
    
    s1.ISBN="0-321-12742-0";s1.author="Lance2";s1.category="Programming";s1.id=1;s1.intro="Modified at Wed
    
     Sep 05 11:51:32 CST 2007";s1.lastUpdate=new Date(1188964292207);s1.name="New book";s1.publisher=null
    
    ;s1.topic="123";
    
    s2.ISBN="0-321-12742-0";s2.author="Lance2";s2.category="Programming";s2.id=2;s2.intro=null;s2.lastUpdate
    
    =new Date(1188963493925);s2.name="New book";s2.publisher=null;s2.topic="Java";
    
    s3.ISBN="0-321-12742-0";s3.author="Lance2";s3.category="Programming";s3.id=3;s3.intro=null;s3.lastUpdate
    
    =new Date(1188964198539);s3.name="New book";s3.publisher=null;s3.topic="Java";
    
    s4.ISBN="0-321-12742-0";s4.author="Lance2";s4.category="Programming";s4.id=4;s4.intro=null;s4.lastUpdate
    
    =new Date(1188964289535);s4.name="New book";s4.publisher=null;s4.topic="Java";
    
    s5.ISBN=null;s5.author=null;s5.category=null;s5.id=5;s5.intro=null;s5.lastUpdate=new Date(1188976151031
    
    );s5.name="lance";s5.publisher=null;s5.topic=null;
    
    s6.ISBN=null;s6.author=null;s6.category=null;s6.id=6;s6.intro=null;s6.lastUpdate=new Date(1188976273105
    
    );s6.name="who is me";s6.publisher=null;s6.topic=null;
    I did a little tracing in firebug and found the callback parameter did not passed to my bookAdaptor.js

  5. #25
    Ext User
    Join Date
    May 2007
    Posts
    15
    Vote Rating
    0
    Jacky is on a distinguished road

      0  

    Default


    I have the same probelm.
    The firefox shows DWR was called.
    But GridUI.getStore().getCount() is 0.

  6. #26
    Ext User
    Join Date
    Sep 2007
    Posts
    1
    Vote Rating
    0
    mtchan48 is on a distinguished road

      0  

    Default Ext + Java + Spring + DWR

    Ext + Java + Spring + DWR


    Hi,

    I deployed the springapp.war into JBoss.
    But encountered java script error when loading the index.jsp page.

    The error is
    Line 37
    Char 6
    Error Expected identifier. string or number
    Code 0
    URL : http://localhost:8080/springapp/index.jsp

    Kindly advise. I need to use the DWR data listing, sorting, and paging asap.

    Thanks.

  7. #27
    Ext User
    Join Date
    Aug 2007
    Posts
    10
    Vote Rating
    0
    mikich is on a distinguished road

      0  

    Default


    Quote Originally Posted by Jacky View Post
    I have the same probelm.
    The firefox shows DWR was called.
    But GridUI.getStore().getCount() is 0.
    Hi,

    I have the same behavior of a DWRProxy, may be some body, who have more experience in Ext can help us?

    Thanks in advance.

  8. #28
    Ext User
    Join Date
    Jun 2007
    Location
    Colorado
    Posts
    49
    Vote Rating
    0
    carol.extjs is on a distinguished road

      0  

    Default


    Quote Originally Posted by mtchan48 View Post
    Hi,

    I deployed the springapp.war into JBoss.
    But encountered java script error when loading the index.jsp page.

    The error is
    Line 37
    Char 6
    Error Expected identifier. string or number
    Code 0
    URL : http://localhost:8080/springapp/index.jsp

    Kindly advise. I need to use the DWR data listing, sorting, and paging asap.

    Thanks.
    Line 37 error sounds like the extra commas in the column model problem mentioned earlier in this thread. IE hates this, firefox has no problem.

    There's also a sticky post about this since the problem is so common: http://extjs.com/forum/showthread.php?t=503

  9. #29
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Quote Originally Posted by lanceChen View Post
    Hi,
    I modified the sample to work in my own sample, but there is no record back. Here is part of my code.

    Code:
    var s0=[];var s1={};var s2={};var s3={};var s4={};var s5={};var s6={};s0[0]=s1;s0[1]=s2;s0[2]=s3;s0[3
    
    ]=s4;s0[4]=s5;s0[5]=s6;
    
    s1.ISBN="0-321-12742-0";s1.author="Lance2";s1.category="Programming";s1.id=1;s1.intro="Modified at Wed
    
     Sep 05 11:51:32 CST 2007";s1.lastUpdate=new Date(1188964292207);s1.name="New book";s1.publisher=null
    
    ;s1.topic="123";
    
    s2.ISBN="0-321-12742-0";s2.author="Lance2";s2.category="Programming";s2.id=2;s2.intro=null;s2.lastUpdate
    
    =new Date(1188963493925);s2.name="New book";s2.publisher=null;s2.topic="Java";
    
    s3.ISBN="0-321-12742-0";s3.author="Lance2";s3.category="Programming";s3.id=3;s3.intro=null;s3.lastUpdate
    
    =new Date(1188964198539);s3.name="New book";s3.publisher=null;s3.topic="Java";
    
    s4.ISBN="0-321-12742-0";s4.author="Lance2";s4.category="Programming";s4.id=4;s4.intro=null;s4.lastUpdate
    
    =new Date(1188964289535);s4.name="New book";s4.publisher=null;s4.topic="Java";
    
    s5.ISBN=null;s5.author=null;s5.category=null;s5.id=5;s5.intro=null;s5.lastUpdate=new Date(1188976151031
    
    );s5.name="lance";s5.publisher=null;s5.topic=null;
    
    s6.ISBN=null;s6.author=null;s6.category=null;s6.id=6;s6.intro=null;s6.lastUpdate=new Date(1188976273105
    
    );s6.name="who is me";s6.publisher=null;s6.topic=null;
    I did a little tracing in firebug and found the callback parameter did not passed to my bookAdaptor.js
    The ListRangeReader assumes that the returned ListRange object from DWR has the property "totalRows" which specifies how many rows in total in the dataset. eg:

    Code:
    @DataTransferObject
    public class ListRange {
    	@RemoteProperty
    	private long		totalRows;
    	@RemoteProperty
    	private Object[]	data;
    	@RemoteProperty
    	private String		errorMessage;
    
    	public ListRange() {
    		this.totalRows = 0;
    		this.data = new Object[] {};
    	}
    	public ListRange(long totalRows, Object[] data) {
    		this.totalRows = totalRows;
    		this.data = data;
    	}
    	public void setData(Object[] data) {
    		this.data = data;
    	}
    	public Object[] getData() {
    		return data;
    	}
    	public void setTotalRows(int totalRows) {
    		this.totalRows = totalRows;
    	}
    	public long getTotalRows() {
    		return totalRows;
    	}
    	public void setErrorMessage(String errorMessage) {
    		this.errorMessage = errorMessage;
    	}
    	public String getErrorMessage() {
    		return errorMessage;
    	}
    }

  10. #30
    Ext User
    Join Date
    Jun 2007
    Posts
    98
    Vote Rating
    0
    ajaxE is on a distinguished road

      0  

    Default


    This is a very interesting approche. I dropped the war directory into tomcat5.5.17. It worked in Firefox 2.007 but not IE6. Any inside?

    Thanks in advance!

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