View Full Version : Problem on RpcProxy with TreePanel

3 Aug 2010, 7:28 AM
Hi, I'm having an error which I don't understand. I have a form on which I have a fieldset. In my fieldset, there is a DualListField. On the To listfield I add a double click listener which displays a window. This window (visibilityWindow) have many content panel where each panel is supposed to contain a checkable TreePanel.

My problem is that when I double click my window appears but my TreePanel although containing many items just displays the first item. With my logs I see that my service implementation is not call in my proxy but after. I put a snippet to help you to understand my issue. May be I'm doing something wrong... Thanks for your help

private com.extjs.gxt.ui.client.widget.Window createVisibilityWindow(String name) {

System.out.println("Debut dans createVisibilityWindow");

com.extjs.gxt.ui.client.widget.Window visibilityWindow = new com.extjs.gxt.ui.client.widget.Window();
visibilityWindow.setHeading(constants.visibility() + " on " + name);
visibilityWindow.setLayout(new AccordionLayout());

// Onglet Transports
ContentPanel cp = new ContentPanel();

TreeLoader<TransportView> loader;
TreePanel<TransportView> tree;

// data proxy
RpcProxy<List<TransportView>> proxy = new RpcProxy<List<TransportView>>() {
protected void load(Object loadConfig, AsyncCallback<List<TransportView>> callback) {
userService.getFleetTransports(1, callback);

// tree loader
loader = new BaseTreeLoader<TransportView>(proxy);

// trees store
TreeStore<TransportView> store = new TreeStore<TransportView>(loader);

tree = new TreePanel<TransportView>(store);

return visibilityWindow;

At runtime, I get the exception java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String which I don't understand (MyService, MyServiceAsync and MyServiceImpl are expecting an Integer and I pass to the method 1 (or new Integer(1)) which is an integer.

3 Aug 2010, 7:36 AM
It is hard to guess without having a fully working testcase. Have you tried to reproduce the problem in a small standalone testcase that implements EntryPoint?

4 Aug 2010, 12:53 AM
Yes I've tried but it doesn't work

4 Aug 2010, 1:12 AM
Than you should try to post this example here

4 Aug 2010, 5:18 AM
Finally I realize that I don't have to use a TreePanel but just a grid with a checkable column. I was wrong by choosing that component which doesn't fit my needs. Thanks