/**
  * Callback method invoked when the user has clicked on the insert button
  *
  * @param valueObject empty value object just created: the user can manage it to fill some
  *     attribute values
  */
 public void createValueObject(ValueObject valueObject) throws Exception {
   LevelPropertyVO vo = (LevelPropertyVO) valueObject;
   DefaultMutableTreeNode node = frame.getHierarTreePanel().getSelectedNode();
   HierarchyLevelVO levelVO = (HierarchyLevelVO) node.getUserObject();
   vo.setProgressiveHie02DOC21(frame.getHierarTreePanel().getProgressiveHIE02());
   vo.setProgressiveHie01DOC21(levelVO.getProgressiveHIE01());
 }
 /**
  * Callback method invoked when the user has clicked on the insert button
  *
  * @param valueObject empty value object just created: the user can manage it to fill some
  *     attribute values
  */
 public void createValueObject(ValueObject valueObject) throws Exception {
   LevelPropertyVO vo = (LevelPropertyVO) valueObject;
   DefaultMutableTreeNode node = frame.getHierarTreePanel().getSelectedNode();
   CompanyHierarchyLevelVO levelVO = (CompanyHierarchyLevelVO) node.getUserObject();
   DocumentTypeVO docTypeVO =
       (DocumentTypeVO)
           frame.getGrid().getVOListTableModel().getObjectForRow(frame.getGrid().getSelectedRow());
   vo.setProgressiveHie02DOC21(frame.getHierarTreePanel().getProgressiveHIE02());
   vo.setProgressiveHie01DOC21(levelVO.getProgressiveHIE01());
   vo.setCompanyCodeSys01DOC21(docTypeVO.getCompanyCodeSys01DOC16());
 }
 /**
  * Callback method invoked on pressing INSERT button.
  *
  * @return <code>true</code> allows to go to INSERT mode, <code>false</code> the mode change is
  *     interrupted
  */
 public boolean beforeInsertGrid(GridControl grid) {
   DefaultMutableTreeNode node = frame.getHierarTreePanel().getSelectedNode();
   if (node == null) {
     // no tree level node selected: insert not allowed!
     JOptionPane.showMessageDialog(
         ClientUtils.getParentFrame(frame),
         ClientSettings.getInstance()
             .getResources()
             .getResource("you must select a tree level before inserting new property"),
         ClientSettings.getInstance().getResources().getResource("Attention"),
         JOptionPane.ERROR_MESSAGE);
     return false;
   }
   return true;
 }