use of org.zkoss.zul.Treeitem in project collect by openforis.
the class SchemaVM method getTreeItem.
// TODO move it to tree model class
private Treeitem getTreeItem(SurveyObject item) {
for (Treeitem treeItem : nodesTree.getItems()) {
SchemaTreeNode node = treeItem.getValue();
SchemaNodeData data = node.getData();
SurveyObject itemSO = data.getSurveyObject();
if (itemSO == item) {
return treeItem;
}
}
return null;
}
use of org.zkoss.zul.Treeitem in project collect by openforis.
the class SchemaVM method refreshSelectedTreeNode.
protected void refreshSelectedTreeNode(Component view) {
Treeitem selectedItem = nodesTree.getSelectedItem();
SchemaTreeNode treeNode = selectedItem.getValue();
SchemaNodeData data = treeNode.getData();
// update context menu
Menupopup popupMenu = getPopupMenu(data);
selectedItem.setContext(popupMenu);
}
Aggregations