Announcement

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

    multiLevel IPickTreeItem showing wrong display value

    Hi -
    I'm using the 4.1p release of SmartGWT and I have a multilevel IPickTreeItem linked with a Parent TreeModelType. The first level of the tree displays correctly, but the 2nd level shows the "id" field instead of the DisplayField. I've included a test case below, and while I'd expect to see:
    parent --> child1
    I get:
    parent --> 2

    Am I doing something wrong? Or is this an issue with the framework? If I change the parentId attribute of the 2nd node to 0, I get:

    parent
    child1

    as expected.
    Code:
    		DynamicForm Form = new DynamicForm();
    		final IPickTreeItem PickTree = new IPickTreeItem("PickTree");
    		PickTree.setDisplayField("Name");
    		PickTree.setValueField("Value");
    		PickTree.setCriteriaField("Value");
    		Form.setID("Form");
    		TreeNode parent = new TreeNode();
    		parent.setAttribute("id", 1);
    		parent.setAttribute("parentId", 0);
    		parent.setAttribute("Name", "parent");
    		parent.setAttribute("Value", "parentValue");
    		TreeNode child1 = new TreeNode();
    		child1.setAttribute("id", 2);
    		child1.setAttribute("parentId", 1);
    		child1.setAttribute("Name", "child1");
    		child1.setAttribute("Value", "value1");
    		Tree menuTree = new Tree();
    
    		menuTree.setParentIdField("parentId");
    		menuTree.setIdField("id");
    		menuTree.setModelType(TreeModelType.PARENT);
    		menuTree.setRootValue(0);
    		menuTree.setData(new TreeNode[] { parent, child1 });
    		PickTree.setValueTree(menuTree);
    
    		PickTree.setWidth(150);
    		PickTree.setShowTitle(false);
    		PickTree.setCanSelectParentItems(true);
    
    		Form.setFields(PickTree);
    
    		Form.draw();

    #2
    This was a real bug. We've made a change to address it in 4.1p and 5.0d.
    Please try the next nightly build, dated March 21 or above

    Regards
    Isomorphic Software

    Comment


      #3
      I just tried the 4.1p 03/21 nightly build and I'm still seeing the issue.

      Comment


        #4
        It looks like the fix missed the window to make it into that nightly build but should be present in the next one. If the problem persists please let us know and we'll re-evaluate.

        Regards
        Isomorphic Software

        Comment

        Working...
        X