Announcement

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

    TreeView problem in IE

    Hi,
    I am using SmartGWT Power 3.0p, I have a problem with TreeViews with Internet Explorer. In IE 8 and IE 9. When setting cascade selection property to false (setCascadeSelection(false)), and when the user checks an item, this item is uncheck automatically
    I've found that when I put a breakpoint the item stays checked until I release the breakpoint.
    Here's a snippet adapted from the http://www.smartclient.com/smartgwt/showcase/#tree_checkbox example that evidences the problem:
    Code:
    public void onModuleLoad() {
            Tree employeeTree = new Tree();  
            employeeTree.setModelType(TreeModelType.PARENT);  
            employeeTree.setRootValue(1);  
            employeeTree.setNameProperty("Name");  
            employeeTree.setIdField("EmployeeId");  
            employeeTree.setParentIdField("ReportsTo");  
            employeeTree.setOpenProperty("isOpen");  
            employeeTree.setData(employeeData);  
      
      
            final TreeGrid employeeTreeGrid = new TreeGrid();  
            employeeTreeGrid.setWidth(200);  
            employeeTreeGrid.setHeight(240);
            employeeTreeGrid.setShowOpenIcons(false);  
            employeeTreeGrid.setShowDropIcons(false);  
            employeeTreeGrid.setData(employeeTree);  
            employeeTreeGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);  
            employeeTreeGrid.setShowSelectedStyle(false);  
            employeeTreeGrid.setShowPartialSelection(true);  
            //employeeTreeGrid.setCascadeSelection(true);  
      
            employeeTreeGrid.addDrawHandler(new DrawHandler() {  
                public void onDraw(DrawEvent event) {  
                    employeeTreeGrid.getTree().openAll();  
                }  
            });  
      
            DynamicForm df = new DynamicForm();  
      
            HLayout layout = new HLayout(20);  
            layout.addMember(employeeTreeGrid);  
            layout.addMember(df);  
      
            layout.draw();
    	}
    	
    	public static final TreeNode[] employeeData = new TreeNode[] {  
             new EmployeeTreeNode("4", "1", "Charles Madigen", "Chief Operating Officer", true),  
             new EmployeeTreeNode("189", "4", "Gene Porter", "Mgr Tech Plng IntIS T", false),  
             new EmployeeTreeNode("265", "189", "Olivier Doucet", "Asset Spec Lines Stns", false),  
             new EmployeeTreeNode("264", "189", "Cheryl Pearson", "Dsl Sys Rep", false),  
             new EmployeeTreeNode("188", "4", "Rogine Leger", "Mgr Syst P P", true)  
    	};
    	
        public static class EmployeeTreeNode extends TreeNode {  
            public EmployeeTreeNode(String employeeId, String reportsTo, String name, String job, boolean isOpen) {  
                setAttribute("EmployeeId", employeeId);  
                setAttribute("ReportsTo", reportsTo);  
                setAttribute("Name", name);  
                setAttribute("Job", job);  
                setAttribute("isOpen", isOpen);  
            }  
        }

    #2
    Sorry, we don't follow - if you set a breakpoint you stop code executing, so you would expect that the checkbox might not be updated until you release the breakpoint.

    Comment


      #3
      Sorry if the breakpoint stuff disturbed your understanding, please forget it.

      The problem is that I didn't expect the checkbox to be unmarked automatically. In Firefox for instance with the same code if I mark a checkbox the checkbox stays marked.

      Comment


        #4
        So the problem is, in IE, you are seeing parent nodes automatically uncheck in IE, but you have set cascadeSelection:false so this should not be happening. And it does not happen in Firefox. Is this correct?

        If so, please try the latest 3.0p build. Also, please remember to report your specific version (not just 3.0p).

        Comment


          #5
          Yes, this is the problem I'm seeing. The 3.0p version is from 07 apr. 2012. Is this a bug that has been resolved after this date?

          Comment


            #6
            This problem does not appear to be occurring with the latest, so we recommend updating.

            Comment

            Working...
            X