when I have two trees on one page-

even if they are in different "verticalpanels"  (which I know are just
columns in a table),
when I select an item on the first; the second tree disappears.

this behavior occurs in hosted mode and in ie, but not in firefox (and
I need to make it work in ie; and hosted mode would be helpful)

any ideas?

(if I redraw one right after adding a new item to the other tree; then
it will show up; but the selection problem is annoying...I don't want
to be continually redrawing if I can help it)

is this a css problem?

please note:  I'm using gwt 1.462 (and no, I cannot upgrade; that it
the version my company is using now)

here's some sample code that can be run to demonstrate the problem
(just instantiate it and put it in an entry-point class):
 package com.amicas.gwt.qc.client.widgets.dragndrop;

import com.google.gwt.user.client.ui.AbsolutePanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Tree;
import com.google.gwt.user.client.ui.TreeItem;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class DualTreeTest extends AbsolutePanel {

    //
STATIC //////////////////////////////////////////////////////////////////
    /** shorthand to refer to the left box */
    private static final int LEFT =0;
    /** shorthand to refer to the right box */
    private static final int RIGHT =1;

    //
STATE //////////////////////////////////////////////////////////////////
    private VerticalPanel its_leftBox;
    private VerticalPanel its_rightBox;


    public DualTreeTest() {

        HorizontalPanel hpan = new HorizontalPanel();
        //hpan.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);

        its_leftBox = new VerticalPanel();

        its_leftBox.add(makeTree());
        its_leftBox.add(new HTML("<P>"));
        //its_leftBox.addMouseListener(new TreeMouseAdapter());
        hpan.add(its_leftBox);

        its_rightBox = new VerticalPanel();
        its_rightBox.add(makeTree());
        hpan.add(its_rightBox);

        add(hpan);
    }


    public Tree makeTree(){
        Tree leftTree = new Tree();
        TreeItem level1 = new TreeItem("level1-1");
        TreeItem leafa = new TreeItem("a");
        TreeItem leafb = new TreeItem("b");
        TreeItem leafc = new TreeItem("c");
        TreeItem leafd = new TreeItem("d");

        level1.addItem(leafa);
        level1.addItem(leafb);
        level1.addItem(leafc);
        level1.addItem(leafd);

        TreeItem level2 = new TreeItem("level1-2");
        TreeItem leafa2 = new TreeItem("a2");
        TreeItem leafb2 = new TreeItem("b3");
        TreeItem leafc2 = new TreeItem("c4");
        TreeItem leafd2 = new TreeItem("d5");

        level2.addItem(leafa2);
        level2.addItem(leafb2);
        level2.addItem(leafc2);
        level2.addItem(leafd2);

        leftTree.addItem(leve11);
        leftTree.addItem(leve12);

        return leftTree;
    }
}



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to