1. #1
    Ext User
    Join Date
    Nov 2008
    Location
    Moscow, Russia
    Posts
    8
    Vote Rating
    0
    John99 is on a distinguished road

      0  

    Default Paging grid and Gilead doesn't work

    Paging grid and Gilead doesn't work


    Hello.
    My BeanModel paging grid doesn't load. I use Gilead in stateless mode and hibernate.
    Code:

    Code:
    RpcProxy<BasePagingLoadResult<User>> proxy = new RpcProxy<BasePagingLoadResult<User>>() {  
    		      @Override  
    		      public void load(Object loadConfig,  
    		          AsyncCallback<BasePagingLoadResult<User>> callback) {  
    		    	  service.loadUserList(callback);
    		      }  
    		    };  
    		  
    		    // loader  
    		    final BasePagingLoader<BasePagingLoadResult<ModelData>> loader = new BasePagingLoader<BasePagingLoadResult<ModelData>>(  
    		        proxy, new BeanModelReader());  
    		    loader.setRemoteSort(true);  
    		  
    		    ListStore<BeanModel> store = new ListStore<BeanModel>(loader);  
    		  
    		    final PagingToolBar toolBar = new PagingToolBar(50);  
    		    //toolBar.add(new Button("ddfsdf"));
    		    toolBar.bind(loader);  
    		  
    		    List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
    			columns.add(new ColumnConfig("id", "Id", 50));
    			columns.add(new ColumnConfig("version", "Version", 100));
    			columns.add(new ColumnConfig("login", "Login", 150));
    			columns.add(new ColumnConfig("firstName", "First Name", 150));
    			columns.add(new ColumnConfig("lastName", "Last Name", 150));
    			columns.add(new ColumnConfig("password", "Password", 150));
    			ColumnModel cm = new ColumnModel(columns);
    		  
    		    final Grid<BeanModel> grid = new Grid<BeanModel>(store, cm);  
    		    grid.addListener(Events.Attach, new Listener<GridEvent<BeanModel>>() {  
    		      public void handleEvent(GridEvent<BeanModel> be) {  
    		    	  grid.getStore().getLoader().load();
    		      }  
    		    });  
    		    grid.setLoadMask(true);  
    		    grid.setBorders(true);  
    		    grid.setAutoExpandColumn("login");  
    		  
    		    ContentPanel panel = new ContentPanel();  
    		    panel.setHeaderVisible(false);
    			panel.setSize(800, 500);
    			panel.setLayout(new FitLayout()); 
    		    panel.setBottomComponent(toolBar);
    but non paging BeanModel Grid loads ok.

    Code:
    Code:
    RpcProxy<List<User>> proxy = new RpcProxy<List<User>>() {
    			@Override
    			public void load(Object loadConfig,
    					AsyncCallback<List<User>> callback) {
    				service.loadUserList(callback);
    			}
    		};
    		BeanModelReader reader = new BeanModelReader();
    
    		// loader and store
    		ListLoader<ListLoadResult<ModelData>> loader = new BaseListLoader<ListLoadResult<ModelData>>(
    				proxy, reader);
    		ListStore<BeanModel> store = new ListStore<BeanModel>(loader);
    
    		// loader.load();
    
    		// column model
    		List<ColumnConfig> columns = new ArrayList<ColumnConfig>();
    		columns.add(new ColumnConfig("id", "Id", 50));
    		columns.add(new ColumnConfig("version", "Version", 100));
    		columns.add(new ColumnConfig("login", "Login", 150));
    		columns.add(new ColumnConfig("firstName", "First Name", 150));
    		columns.add(new ColumnConfig("lastName", "Last Name", 150));
    		columns.add(new ColumnConfig("password", "Password", 150));
    		ColumnModel cm = new ColumnModel(columns);
    
    		final Grid<BeanModel> grid = new Grid<BeanModel>(store, cm);
    		// grid.setAutoExpandColumn("login");
    
    		grid.setLoadMask(true);
    		grid.addListener(Events.Attach, new Listener<GridEvent<BeanModel>>() {
    			@Override
    			public void handleEvent(GridEvent<BeanModel> be) {
    				grid.getStore().getLoader().load();
    			}
    		});
    
    		ContentPanel panel = new ContentPanel();
    		// panel.setHeading("BeanModel Grid Example");
    		panel.setHeaderVisible(false);
    		panel.setSize(800, 500);
    		panel.setLayout(new FitLayout());
    		panel.add(grid);
    Regards, Evgeny

  2. #2
    Ext User
    Join Date
    Nov 2008
    Location
    Moscow, Russia
    Posts
    8
    Vote Rating
    0
    John99 is on a distinguished road

      0  

    Exclamation


    CLOSED. My fault. ))

  3. #3
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961
    Vote Rating
    0
    Arno.Nyhm is on a distinguished road

      0  

    Default


    Quote Originally Posted by John99 View Post
    CLOSED. My fault. ))
    can you please also describe how you solve it? this helps others with a similar problem.
    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts • Search Results • Advanced Search form • Category overview http://www.extjs.com/forum/showthrea...041#post410041

  4. #4
    Sencha User borisperezg's Avatar
    Join Date
    May 2010
    Posts
    22
    Vote Rating
    0
    borisperezg is on a distinguished road

      0  

    Default


    Hi... I have the same problem but, I could not make it work.

    I have my Entidad and EntidadBeanModel... but, when I compile the project I get this error:
    Compiling module co.gov.dafp.web.DataExploration
    [java] Resolving co.gov.dafp.web.client.model.EntidadBeanModel
    [java] Found type 'co.gov.dafp.web.client.model.EntidadBeanModel'
    [java] [ERROR] Annotation error: cannot resolve co.gov.dafp.web.client.model.Entidad
    [java] java.lang.ClassNotFoundException: co.gov.dafp.web.client.model.Entidad

    At the of error I get this other message:
    [ERROR] Line 34: Failed to resolve 'com.extjs.gxt.ui.client.data.BeanModelLookup' via deferred binding

    DataExploration is my Entry-point. The source code for both classes are:

    Code:
    package co.gov.dafp.web.client.model;
    
    import com.extjs.gxt.ui.client.data.BeanModelMarker;
    import com.extjs.gxt.ui.client.data.BeanModelMarker.BEAN;
    
    @BEAN(co.gov.dafp.web.client.model.Entidad.class)
    public interface EntidadBeanModel extends BeanModelMarker {
    
    }
    Code:
    package co.gov.dafp.web.client.model;
    
    import java.io.Serializable;
    
    import com.extjs.gxt.ui.client.data.BeanModelTag;
    
    public class Entidad implements  BeanModelTag, Serializable {
    
    	private String id, nombre, departamento, municipio;
    
    	public Entidad(){}
    	
    	public Entidad(String id, String nombre, String departamento,
    			String municipio) {
    		super();
    		this.id = id;
    		this.nombre = nombre;
    		this.departamento = departamento;
    		this.municipio = municipio;
    	}
    
    	public String getId() {
    		return id;
    	}
    
    	public void setId(String id) {
    		this.id = id;
    	}
    
    	public String getNombre() {
    		return nombre;
    	}
    
    	public void setNombre(String nombre) {
    		this.nombre = nombre;
    	}
    
    	public String getDepartamento() {
    		return departamento;
    	}
    
    	public void setDepartamento(String departamento) {
    		this.departamento = departamento;
    	}
    
    	public String getMunicipio() {
    		return municipio;
    	}
    
    	public void setMunicipio(String municipio) {
    		this.municipio = municipio;
    	}
    }
    I hope that someone can help me. Thanks a lot.

  5. #5
    Sencha User borisperezg's Avatar
    Join Date
    May 2010
    Posts
    22
    Vote Rating
    0
    borisperezg is on a distinguished road

      0  

    Default Resolved

    Resolved


    Hi... I reviewed several forum and I found the solution. In this page I found it:
    http://www.mail-archive.com/cypal-st.../msg00144.html

    The problem is that at the compiling time, the classes folder is clean, so, the class's reference in Bean tag is missing, so, I had to create another project and put there the class.

    So, Entidad and EntidadBeanModel were created in other proyect and associated in build path of my proyect and too in and Ant file maked to create war file.

    So... problem resolved.

    Sorry for English.

    See ya.

Thread Participants: 2

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