Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • kimmie
    replied
    I'm using SmartGWT 2.4 and GWT 2.2 on eclipse Indigo.

    I've created a GWT project and put all of the Test code in it. On a fetch (or any service call), I get the following error:
    Code:
    14:31:45.760 [ERROR] [gwtrpc] 14:31:45.758:WARN:RPCManager:Error performing rpcRequest: error: FAILURE, response: {clientContext: Obj,
    status: -1,
    context: undef,
    startRow: 0,
    endRow: 0,
    totalRows: 0}
    
    com.smartgwt.client.core.JsObject$SGWT_WARN: 14:31:45.758:WARN:RPCManager:Error performing rpcRequest: error: FAILURE, response: {clientContext: Obj,
    status: -1,
    context: undef,
    startRow: 0,
    endRow: 0,
    totalRows: 0}
    <snip stack trace>
    Here is my EntryPoint:
    Code:
    public class YourEntryPoint implements EntryPoint {
    
    	@Override
    	public void onModuleLoad() {
    
    		Canvas canvas = new Canvas();
    		TestDataSource dataSource = new TestDataSource();
    
    		final ListGrid yourGrid = new ListGrid();
    		yourGrid.setWidth(550);
    		yourGrid.setHeight(200);
    		yourGrid.setCellHeight(22);
    		yourGrid.setDataSource(dataSource);
    
    		ListGridField nameField = new ListGridField("name", "Name");
    		ListGridField locationField = new ListGridField("date", "DATE");
    		yourGrid.setFields(nameField, locationField);
    
    		yourGrid.setAutoFetchData(true);
    //		yourGrid.setDataFetchMode(FetchMode.BASIC); 
    		yourGrid.setDataFetchMode(FetchMode.PAGED); 
    		yourGrid.setShowAllRecords(false);
    		yourGrid.setDataPageSize(20);
    		yourGrid.setCanEdit(true);
    		yourGrid.setShowFilterEditor(true);
    		yourGrid.setEditEvent(ListGridEditEvent.DOUBLECLICK);
    
            IButton addRow = new IButton("Add new row");  
            addRow.addClickHandler(new ClickHandler() {  
                public void onClick(ClickEvent event) {  
                    ListGridRecord rec = new ListGridRecord();  
                    rec.setAttribute("name", "yourName");  
                    rec.setAttribute("date", new Date());                   
                    yourGrid.addData(rec);
                }             
            });  
            addRow.setLeft(0);  
            addRow.setTop(240);  
            addRow.setWidth(140); 
            
            IButton removeAll = new IButton("Remove All Selected");  
            removeAll.addClickHandler(new ClickHandler() {  
                public void onClick(ClickEvent event) {  
                    ListGridRecord[] selectedRecords = yourGrid.getSelection();  
                    for(ListGridRecord rec: selectedRecords) {  
                        yourGrid.removeData(rec);  
                    }  
                }             
            });  
            removeAll.setLeft(320);  
            removeAll.setTop(240);  
            removeAll.setWidth(140); 
    		
    		canvas.addChild(yourGrid);
    		canvas.addChild(addRow);
    		canvas.addChild(removeAll);
    
    		canvas.draw(); 
    		
    		// for debugging only, shows the developer console when hitting CTRL-D.
    		if (!GWT.isScript()) {
    			KeyIdentifier debugKey = new KeyIdentifier();
    			debugKey.setCtrlKey(true);
    			debugKey.setKeyName("D");
    			Page.registerKey(debugKey, new KeyCallback() {
    				public void execute(String keyName) {
    					SC.showConsole();
    				}
    			});
    		}
    	}
    
    }
    I always get this error, no matter how I use the GwtRpcDataSource. It always happens on the return from the service implementation.

    Anybody have a clue? I've also tested out the generic gwtrpcdatasource in marbot's thread and it works fine.

    Leave a comment:


  • slick07
    replied
    Hi guys,
    This thread is very helpful and i really appreciate your work but i have a problem regarding my GwtRpcDataSource with nested data.
    I have a DS called Calendar that contains a list of CalendarDays(nested data). I want to represent all my calendars in a selectItem (which i already implemented and it works) and each time i select a calendar from the selectIteam i want to see in a listGrid the corresponding days. If you please point me to a gwt-rpc datasource example that uses nested data (within the same datasource not nested datasources) or give me a hint.

    Thank you

    Leave a comment:


  • MarioNubbius
    replied
    Hi Bitblaster,

    Where can I download the source / project?

    If anyone has the source, could post a place where is avalaible?

    Thanks.

    Originally posted by bitblaster
    Hi to all, at last i managed to use filtering, sorting and pagination (lazy loading) all server-side.
    Starting from the excellent work af alius, i improved its base class GwtRpcDatasource and created a set of utility classes which help in the creation of a Rpc datasource.
    I made a simple Eclipse project showing this functionalities so that you can test it quickly and import the classes you need in your project.
    The most important innovation is the management of the advanced criterias passed from the smartgwt's FilterBuider, which are converted in a internal tree of GWTCriterions and then passed server-side where they're converted in a true-java Criterion tree, which in turn, using reflection, filters our result.

    So, briefly, in the server call you have:
    - filter criterions
    - sorting field
    - pagination start and end

    Using this information you can do your data extraction in whatever way you need and return the result to the (client) caller.
    I made a simple example with a static list of data and it works (i've not implemented the sorting, but it's trivial).

    I tried to upload here a zip (24kb) with the project, but it's not possible, so i've uploaded it to rapidshare and put here the link.

    http://rapidshare.com/files/21686999...ource.zip.html

    @Administrators: If it's in contrast with the forum rules please remove this link

    Let me know if you find bugs or a way to improve it.
    Bye
    Bit

    Leave a comment:


  • andyx1975
    replied
    1. With Smartgwt 2.5 I do not have to built it again. As far as I understood the custom server is already implemented. Right?

    2. Can somebody supply a working solution. All uploaded files are not available anymore. Thanks!!!

    Leave a comment:


  • Shoonya
    replied
    Does anybody have code posted by bitblaster on 3rd Apr 2009, 02:10 ?
    It's having server side pagination and filtering.

    Leave a comment:


  • rdk
    replied
    Hi.. has anyone found a solution for this problem. I have run into the same issue and have not found any solution. I am using gwt2.2.


    Originally posted by kvb
    Hi all,

    First off: thanks so much for this discussion, it helped me a great lot with getting GWT-RPC datasources working.

    The only problem I still have left is fetching data using Criteria. I've looked at and tried the example from this thread with the GWTCriterion class, but I'm getting this error when I'm running it:

    Code:
    [ERROR] com.google.gwt.user.client.rpc.SerializationException
    [ERROR] 	at com.google.gwt.user.client.rpc.impl.SerializerBase.check(SerializerBase.java:161)
    [ERROR] 	at com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:145)
    [ERROR] 	at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:199)
    [ERROR] 	at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
    [ERROR] 	at nl.kees.test.db.client.util.criteria.GWTCriterion_FieldSerializer.serialize(GWTCriterion_FieldSerializer.java:32)
    [ERROR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [ERROR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [ERROR] 	at java.lang.reflect.Method.invoke(Method.java:592)
    [ERROR] 	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    [ERROR] 	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    [ERROR] 	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
    [ERROR] 	at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
    [ERROR] 	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
    [ERROR] 	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
    [ERROR] 	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
    [ERROR] 	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:284)
    [ERROR] 	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    [ERROR] 	at com.google.gwt.user.client.rpc.impl.SerializerBase$MethodMap$.serialize$(SerializerBase.java)
    [ERROR] 	at com.google.gwt.user.client.rpc.impl.SerializerBase.serialize(SerializerBase.java:147)
    [ERROR] 	at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamWriter.serialize(ClientSerializationStreamWriter.java:199)
    [ERROR] 	at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
    [ERROR] 	at nl.kees.test.db.client.admin.AdminDataService_Proxy.fetch(AdminDataService_Proxy.java:52)
    [ERROR] 	at nl.kees.test.db.client.util.DynamicDataSource.executeFetch(DynamicDataSource.java:90)
    [ERROR] 	at nl.kees.test.db.client.util.GwtRpcDataSource.transformRequest(GwtRpcDataSource.java:105)
    [ERROR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [ERROR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [ERROR] 	at java.lang.reflect.Method.invoke(Method.java:592)
    [ERROR] 	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    [ERROR] 	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    [ERROR] 	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
    [ERROR] 	at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
    [ERROR] 	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
    [ERROR] 	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
    [ERROR] 	at java.lang.Thread.run(Thread.java:595)

    I read somewhere that since GWT 2.0 (which I'm using), the IsSerializable is re-introduced instead of the regular Serializable, which might make this old example to crash?

    Does anyone have this working (GWT-RPC fetching with Criteria) in GWT 2.0?

    Thanks for any help!

    Regards,

    Kees.

    Leave a comment:


  • rdk
    replied
    Hi.. has anyone found a solution for this problem. I have run into the same issue and have not found any solution. I am gwt2.2.

    Originally posted by ron.lawrence
    Same exact error here, using GWT 2.0.1 and the latest ee trial, but I'm not using a datasource at all, just invoking a Gwt Rpc service directly with

    Code:
    XXXService.Util.getInstance().doit(arg, callback)
    where arg is just an object with a list of other objects, all of which implement Serializable. When I print this with GWT.log I get the extra string "null" after the exception in the stack trace.

    It looks like (http://www.docjar.com/html/api/com/google/gwt/user/client/rpc/impl/SerializerBase.java.html) the "serialize" and later "check" method is getting a null value somehow. Not sure if this is a result of anything related to smartclient or not. I'm planning to experiment with this in another non-smartclient project today to see if I can recreate it there.

    Leave a comment:


  • tem3k
    replied
    ListGrid grid = (ListGrid) Canvas.getById(request.getComponentId());



    How can I solve this problem?

    Leave a comment:


  • sameeh.harfoush
    replied
    Originally posted by asdfasldkfj
    Smart GWT Guru , please help me !!!!

    I sew lot of examples but I could not refresh my data in ComboboxItem.

    When I type in cobobox item it doesn't refresh data.
    It's calls only once transformRequest.

    I tried set different values
    such as :
    supplyItemDS.setCacheAllData(true);
    supplyItemDS.setAutoCacheAllData(true);
    item.setAutoFetchData(false);
    item.setAutoFetchData(true);

    I can call manually
    supplyItemDS.fetchData();

    but data is still old.

    Could anybode help how I can dynamically refresh my data in datasource and in combobox by typing value in it.

    Thanks
    Hello,
    I am facing the same problem, transformRequest is called only once
    did you solve the problem ??

    Leave a comment:


  • muelleco
    replied
    Hi

    I have implemented the gwt-RPC DataSource as Alius described in this thread. I have created a delete Button which should remove the selected records in the grid:

    Code:
     IButton buttonDel = new IButton("delete invoices");
    		buttonDel.addClickHandler(new ClickHandler() {
    			public void onClick(ClickEvent event) {
    				ListGridRecord[] recordsToDelete = openInvoicesGrid
    						.getSelection();
    				for (ListGridRecord record : recordsToDelete) {
    					datasource.removeData(record);
    				}
    			}
    		});
    		canvas.addChild(buttonDel);
    But nothing happens. How can I fire the remove method implementation?

    Leave a comment:


  • matucasal
    replied
    Hello, I am trying to make an update with a nested form ( http://www.smartclient.com/smartgwt/showcase/#grid_nested_form ).


    I am using the GwtRpcDataSource

    My datasource is the following

    Code:
    public class TestDataSource  extends GwtRpcDataSource {
    
        public TestDataSource () {
            DataSourceField field;
            field = new DataSourceIntegerField ("id", "ID");
            field.setPrimaryKey (true);
            field.setRequired (false);
            addField (field);
            field = new DataSourceTextField ("name", "NAME");
            field.setRequired (true);
            addField (field);
            field = new DataSourceDateField ("date", "DATE");
            field.setRequired (false);
            addField (field);
        }
    
        @Override
        protected void executeFetch (final String requestId, final DSRequest request, final DSResponse response) {
    TestServiceAsync service = GWT.create (TestService.class);
            service.fetch (new AsyncCallback<List<TestRecord>> () {
                public void onFailure (Throwable caught) {
                    response.setStatus (RPCResponse.STATUS_FAILURE);
                    processResponse (requestId, response);
                }
                public void onSuccess (List<TestRecord> result) {
                    ListGridRecord[] list = new ListGridRecord[result.size ()];
                    for (int i = 0; i < list.length; i++) {
                        ListGridRecord record = new ListGridRecord ();
                        copyValues (result.get (i), record);
                        list[i] = record;
                    }
                    response.setData (list);
                    processResponse (requestId, response);
                }
            });
        }
    
        @Override
        protected void executeAdd (final String requestId, final DSRequest request, final DSResponse response) {
           JavaScriptObject data = request.getData ();
            ListGridRecord rec = new ListGridRecord (data);
            TestRecord testRec = new TestRecord ();
            copyValues (rec, testRec);
            TestServiceAsync service = GWT.create (TestService.class);
            service.add (testRec, new AsyncCallback<TestRecord> () {
                public void onFailure (Throwable caught) {
                    response.setStatus (RPCResponse.STATUS_FAILURE);
                    processResponse (requestId, response);
                }
                public void onSuccess (TestRecord result) {
                    ListGridRecord[] list = new ListGridRecord[1];
                    ListGridRecord newRec = new ListGridRecord ();
                    copyValues (result, newRec);
                    list[0] = newRec;
                    response.setData (list);
                    processResponse (requestId, response);
                }
            });
        }
    
        @Override
        protected void executeUpdate (final String requestId, final DSRequest request, final DSResponse response) {
            JavaScriptObject data = request.getData ();
            ListGridRecord rec = new ListGridRecord (data);
            ListGrid grid = (ListGrid) Canvas.getById (request.getComponentId ());
             int index = grid.getRecordIndex (rec);
            rec = (ListGridRecord) grid.getEditedRecord (index);
            TestRecord testRec = new TestRecord ();
            copyValues (rec, testRec);
            TestServiceAsync service = GWT.create (TestService.class);
            service.update (testRec, new AsyncCallback<TestRecord> () {
                public void onFailure (Throwable caught) {
                    response.setStatus (RPCResponse.STATUS_FAILURE);
                    processResponse (requestId, response);
                }
                public void onSuccess (TestRecord result) {
                    ListGridRecord[] list = new ListGridRecord[1];
                    ListGridRecord updRec = new ListGridRecord ();
                    copyValues (result, updRec);
                    list[0] = updRec;
                    response.setData (list);
                    processResponse (requestId, response);
                }
            });
        }
    
        @Override
        protected void executeRemove (final String requestId, final DSRequest request, final DSResponse response) {
            JavaScriptObject data = request.getData ();
            final ListGridRecord rec = new ListGridRecord (data);
            TestRecord testRec = new TestRecord ();
            copyValues (rec, testRec);
            TestServiceAsync service = GWT.create (TestService.class);
            service.remove (testRec, new AsyncCallback () {
                public void onFailure (Throwable caught) {
                    response.setStatus (RPCResponse.STATUS_FAILURE);
                    processResponse (requestId, response);
                }
                public void onSuccess (Object result) {
                    ListGridRecord[] list = new ListGridRecord[1];
                    list[0] = rec;
                    response.setData (list);
                    processResponse (requestId, response);
                }
    
            });
        }
    
        private static void copyValues (ListGridRecord from, TestRecord to) {
            to.setId (from.getAttributeAsInt ("id"));
            to.setName (from.getAttributeAsString ("name"));
            to.setDate (from.getAttributeAsDate ("date"));
        }
    
        private static void copyValues (TestRecord from, ListGridRecord to) {
            to.setAttribute ("id", from.getId ());
            to.setAttribute ("name", from.getName ());
            to.setAttribute ("date", from.getDate ());
        }
    }
    And my entry point class :
    Code:
    public class ProbandoDataSource implements EntryPoint {
    
    	public void onModuleLoad() {
    
    		final DataSource dataSource = new TestDataSource();
    
    		final ListGrid listGrid = new ListGrid() {
    			@Override
    			protected Canvas getExpansionComponent(final ListGridRecord record) {
    
    				final ListGrid grid = this;
    				VLayout layout = new VLayout(2);
    				
    				final DynamicForm df = new DynamicForm();
    				df.setNumCols(2);
    				df.setDataSource(dataSource);
    
    				df.addDrawHandler(new DrawHandler() {
    					public void onDraw(DrawEvent event) {
    						df.editRecord(record);
    					}
    				});
    
    				IButton saveButton = new IButton("Save");
    				saveButton.addClickHandler(new ClickHandler() {
    					public void onClick(ClickEvent event) {
    						 df.saveData();
    //I m using this to  update the record on the grid ( the view)
    	record.setAttribute("id", (Integer) df.getValue("id"));
    	record.setAttribute("name", (String) df.getValue("name"));
    	record.setAttribute("date", (Date) df.getValue("date"));
    
    //dataSource.updateData(record); fails
    // grid.updateData(record); fails		
    			}
    				});
    
    				IButton cancelButton = new IButton("Done");
    				cancelButton.addClickHandler(new ClickHandler() {
    					public void onClick(ClickEvent event) {
    						grid.collapseRecord(record);
    					}
    				});
    
    				HLayout hLayout = new HLayout(10);
    				hLayout.addMember(saveButton);
    				hLayout.addMember(cancelButton);
    
    				layout.addMember(df);
    				layout.addMember(hLayout);
    				return layout;
    			}
    		};
                    listGrid.setCanExpandRecords(true);
    		listGrid.setAutoFetchData(true);
    		listGrid.setDataSource(dataSource);
    
    		ListGridField itemNameField = new ListGridField("name");
    		ListGridField skuField = new ListGridField("id");
    
    		listGrid.setFields(itemNameField, skuField);
    
    		listGrid.draw();
    	}
    
    }
    My problem is that when I am press the save button this error is shown :


    Java.lang.ClassCastException: com.smartgwt.client.widgets.form.DynamicForm cannot be cast to com.smartgwt.client.widgets.grid.ListGrid
    at datasource.example.client.TestDataSource.executeUpdate(TestDataSource.java:98).

    When I tried with

    Code:
    dataSource.updateData(record); 
     grid.updateData(record);
    This error is shown

    Java.lang.NullPointerException: null
    at datasource.example.client.TestDataSource.executeUpdate(TestDataSource.java:100)

    Thas anyone knows how to solve my error?
    Thanks!

    PD: When I dont use the expanded nested form , and I update with
    grid.setCanEdit(true); , it works perfectly

    Leave a comment:


  • asdfasldkfj
    replied
    This is my class with the problem.
    Attached Files

    Leave a comment:


  • asdfasldkfj
    replied
    Smart GWT Guru , please help me !!!!

    I sew lot of examples but I could not refresh my data in ComboboxItem.

    When I type in cobobox item it doesn't refresh data.
    It's calls only once transformRequest.

    I tried set different values
    such as :
    supplyItemDS.setCacheAllData(true);
    supplyItemDS.setAutoCacheAllData(true);
    item.setAutoFetchData(false);
    item.setAutoFetchData(true);

    I can call manually
    supplyItemDS.fetchData();

    but data is still old.

    Could anybode help how I can dynamically refresh my data in datasource and in combobox by typing value in it.

    Thanks

    [CODE]
    class DynamicLoadDataSource extends DataSource {

    public boolean change;

    public DynamicLoadDataSource() {
    setID("dynamicLoadDataSource");
    setDataProtocol (DSProtocol.CLIENTCUSTOM);
    setDataFormat (DSDataFormat.CUSTOM);
    setClientOnly (false);


    DataSourceTextField itemNameField = new DataSourceTextField("itemName", "Item");

    addField(unitCostField);
    }

    protected Object transformRequest (DSRequest request) {
    String requestId = request.getRequestId ();
    DSResponse response = new DSResponse ();
    response.setAttribute ("clientContext", request.getAttributeAsObject ("clientContext"));
    // Asume success
    response.setStatus (0);
    switch (request.getOperationType ()) {
    case FETCH:
    executeFetch (requestId, request, response);
    break;
    }
    return request.getData ();
    }

    protected void executeFetch (final String requestId, final DSRequest request, final DSResponse response) {

    response.setData(getRecords(10))
    processResponse (requestId, response);
    }

    ListGridRecord[] getRecords(int j) {
    ListGridRecord[] result = new ListGridRecord[j];
    ListGridRecord item = null;
    for(int i = 0; i < j; i++) {
    item = new ListGridRecord();
    item.setAttribute("itemID", new Integer(i));
    item.setAttribute("itemName", "item name " + i);
    item.setAttribute("description", "description " + i);
    item.setAttribute("category", "category " + i);
    item.setAttribute("units", "unit " + i);
    item.setAttribute("unitCost", new Float(i));
    result[i] = item;
    }
    return result;
    }

    private void forum() {

    final ComboBoxItem item = new ComboBoxItem("itemID");
    item.setWidth(240);
    item.setTitle("Item");
    item.setValueField("itemName");
    item.setDisplayField("description");
    item.setPickListWidth(450);
    item.setPickListFields(itemField);
    item.setOptionDataSource(supplyItemDS);
    item.setAutoFetchData(false);


    DynamicForm f = new DynamicForm();
    f.setFields(item);
    main.draw();
    }
    }

    [CODE]

    Leave a comment:


  • hakito
    replied
    I found a not so clean solution to my problem. in GwtRpcDataSource i override transform response.
    Code:
        @Override
        protected void transformResponse(DSResponse response,
            DSRequest request,
            Object data)
        {
        	switch(request.getOperationType())
        	{
        		case UPDATE:
        			request.setData(request.getOldValues());
        			break;
        	}
        	super.transformResponse(response, request, data);
        }
    This gives a warning
    Update operation - submitted record with primary key value[s]:{email: "before@example.com"} returned with modified primary key:{email: "after@example.com"}. This may indicate bad server logic. Updating cache to reflect new primary key.
    I also tried to use response.setInvalidateCache(true) instead of the request.setData(). But this is much slower because a fetch operation is performed.

    Leave a comment:


  • Coolcold
    replied
    ****Problem resolve i discover that i was setting the datasource after i set the treegridfields i change this and all works now =D
    *****


    I have use GWT-RPC on listgrid comboboxitem selectitem and work really nice =D

    But recently i try to use it on a Treegrid

    All work fine excepto for one thing it doesnt show the columns i set
    this is how i set my datasource .


    Code:
    	        DataSourceTextField nombre = new DataSourceTextField(menuEnum.NOMBRE.getValue(), menuEnum.NOMBRE.getDesc(), 300);
    	        
    	        DataSourceIntegerField NODEID = new DataSourceIntegerField (menuEnum.NODEID.getValue(),	menuEnum.NODEID.getDesc());
    	        NODEID.setPrimaryKey (true);
    	        NODEID.setRequired (true);
    	        
    	        DataSourceIntegerField  PARENTNODE = new DataSourceIntegerField (menuEnum.PARENTNODE.getValue(),menuEnum.PARENTNODE.getDesc());
    	        PARENTNODE.setForeignKey(id+"."+menuEnum.NODEID.getValue());
    	        PARENTNODE.setRequired (true);
    	        PARENTNODE.setRootValue(0);
    	        
    	        
    	        DataSourceTextField NOMBRE_VISTA = new DataSourceTextField(menuEnum.NOMBRE_VISTA.getValue(), menuEnum.NOMBRE_VISTA.getDesc(), 300);
    	        
    	       setFields(nombre,NODEID,PARENTNODE,NOMBRE_VISTA);


    I test it on a list grid and works , it show the columns

    but on the treegrid it only show one column with the name "Name" , all info shows correct, the problem its the columsn

    Maybe i do something wrong, or treegrid works diferent

    Sorry for my bad english ..

    Thanks
    Last edited by Coolcold; 18 Jun 2010, 13:51.

    Leave a comment:

Working...
X