コード例 #1
0
 /**
  * Action: Delete Node from Tree
  *
  * @param item item
  */
 public void deleteNode(ListItem item) {
   if (item != null) {
     if (m_tree.isProduct()) {
       MTree_NodePR node = MTree_NodePR.get(m_tree, item.id);
       if (node != null) node.delete(true);
     } else if (m_tree.isBPartner()) {
       MTree_NodeBP node = MTree_NodeBP.get(m_tree, item.id);
       if (node != null) node.delete(true);
     } else if (m_tree.isMenu()) {
       MTree_NodeMM node = MTree_NodeMM.get(m_tree, item.id);
       if (node != null) node.delete(true);
     } else {
       MTree_Node node = MTree_Node.get(m_tree, item.id);
       if (node != null) node.delete(true);
     }
   }
 } //	action_treeDelete
コード例 #2
0
 /**
  * Action: Add Node to Tree
  *
  * @param item item
  */
 public void addNode(ListItem item) {
   if (item != null) {
     //	May cause Error if in tree
     if (m_tree.isProduct()) {
       MTree_NodePR node = new MTree_NodePR(m_tree, item.id);
       node.saveEx();
     } else if (m_tree.isBPartner()) {
       MTree_NodeBP node = new MTree_NodeBP(m_tree, item.id);
       node.saveEx();
     } else if (m_tree.isMenu()) {
       MTree_NodeMM node = new MTree_NodeMM(m_tree, item.id);
       node.saveEx();
     } else {
       MTree_Node node = new MTree_Node(m_tree, item.id);
       node.saveEx();
     }
   }
 } //	action_treeAdd