4

Windows Explorer のようなディレクトリ構造を実装しています。フォルダーの追加、フォルダーの削除などのフォルダー操作が行われた後、ツリーの特定のノードを再レンダリングしたい

private ListDataProvider<Object> dataProvider= new ListDataProvider<Object>();

private Object current;//store object of currentNode;

private Map<Object, ListDataProvider<Object>> keyprovider =
    new HashMap<Object,ListDataProvider<Object>>();

private CellTree tree;

// keeps a map for storing dataproviders in each hierarchy , 

public void setListToCurrentNode(List<Object> newList){

    //adding this newlist to current data provider not reflecting to display
    keyprovider.get(currentObject).setList(newList);

}

public void onModuleLoad(){

    treeSelectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {

        public void onSelectionChange(SelectionChangeEvent event) {

            //setting current object as selected  node
            current = treeSelectionModel.getSelectedObject();

        }
    });

}
4

2 に答える 2