Hi there,

I use a tree in my app. Here is the code i use BEFORE rendering (on
the first time the page is built):

                treePanel = new TreePanel();
                treePanel.setAnimate(true);
                treePanel.setEnableDD(true);
                treePanel.setButtonAlign(Position.CENTER);
                treePanel.setContainerScroll(true);
                treePanel.setRootVisible(true);
                treePanel.setWidth(225);
                treePanel.setHeight(300);
                treePanel.setSelectionModel(new MultiSelectionModel());
                XMLTreeLoader loader = new XMLTreeLoader();
                String url =
Constantes.getInstance().getMyConstants().servicesUrl();
                url += 
Constantes.getInstance().getMyConstants().servicesXmlMenu();
                url += "?";
                url +=
Constantes.getInstance().getMyConstants().servicesActionTag();
                url += "=get";
                loader.setDataUrl(url);
                loader.setMethod(Connection.GET);
                loader.setRootTag("menus");
                loader.setFolderTitleMapping("@libelle");
                loader.setFolderTag("rubrique");
                loader.setLeafTitleMapping("@libelle");
                loader.setLeafTag("menu");
                loader.setAttributeMappings(new String[] { "@id" });
                root = new AsyncTreeNode(DefaultMenusTreeListener.ROOT_TEXT,
loader);
                root.setAttribute("id", DefaultMenusTreeListener.ROOT_ID);
                treePanel.setRootNode(root);
                root.expand();
                treePanel.expandAll();

This code works fine. But you see that in the url, i want to add a
dynamique parameter (some id). For exemple, the first time the url
will be :

http://www.something.com/services/getMenus?action=get

then it will be

http://www.something.com/services/getMenus?action=get&id=3

to get the description of the 3rd menu in the same tree.

How may I dinamically change? When I put
                loader.setDataUrl(url2);
                root.reload();
the wrong url is called (still url1)....

Thanks;


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GWT-Ext Developer Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/gwt-ext?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to