Announcement

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

    IPickTree set value when using Option DataSource

    I have a ListGrid where a user can select some items. And a form containing a IPickTree Item which should show the selected information. As the selected item in the ListGrid only holds the "ID" of the information to show in the PickTree the IPickTree has an datasource attached.

    Code:
    messageCategoryItems = new IPickTreeItem("categoryName", "Node");
    messageCategoryItems.setTitle("Node");
    messageCategoryItems.setDisplayField("categoryName");
    messageCategoryItems.setValueField("cmtCategoryID");
    messageCategoryItems.setCanSelectParentItems(true);
    messageCategoryItems.setDataSource(categoryDS);
    messageCategoryItems.setLoadDataOnDemand(true);
    Now when a user selects something in the listgrid i want to update the IPickTreeItem to show the selected information from that enty

    Code:
    messageCategoryItems.setValue(currentCategoryId);
    If i do it like that the IPickTree shows the "ID" (number) and not the DisplayField !

    How can i achive that ??

    #2
    that solved it
    Code:
    messageCategoryItems.setValueMap(valueMap);							messageCategoryItems.setValue(Long.toString(currentCategoryId));

    Comment

    Working...
    X