public OperationsGridFrame(GridController controller) {
    try {
      jbInit();
      setSize(750, 550);
      setMinimumSize(new Dimension(750, 550));

      operationsGridControl.setController(controller);
      operationsGridControl.setGridDataLocator(opGridDataLocator);
      opGridDataLocator.setServerMethodName("loadOperations");

      // task lookup...
      taskDataLocator.setGridMethodName("loadTasks");
      taskDataLocator.setValidationMethodName("validateTaskCode");
      colTaskCode.setLookupController(taskController);
      colTaskCode.setControllerMethodName("getTasksList");
      taskController.setLookupDataLocator(taskDataLocator);
      taskController.setFrameTitle("tasks");
      taskController.setLookupValueObjectClassName("org.jallinone.registers.task.java.TaskVO");
      taskController.addLookup2ParentLink("taskCodeREG07", "taskCodeReg07PRO04");
      taskController.addLookup2ParentLink("descriptionSYS10", "taskDescriptionSYS10");
      taskController.setAllColumnVisible(false);
      taskController.setVisibleColumn("taskCodeREG07", true);
      taskController.setVisibleColumn("descriptionSYS10", true);
      taskController.addLookupListener(
          new LookupListener() {

            public void codeValidated(boolean validated) {}

            public void codeChanged(ValueObject parentVO, Collection parentChangedAttributes) {}

            public void beforeLookupAction(ValueObject parentVO) {
              OperationVO vo = (OperationVO) parentVO;
              taskDataLocator
                  .getLookupFrameParams()
                  .put(ApplicationConsts.COMPANY_CODE_SYS01, vo.getCompanyCodeSys01PRO04());
              taskDataLocator
                  .getLookupValidationParameters()
                  .put(ApplicationConsts.COMPANY_CODE_SYS01, vo.getCompanyCodeSys01PRO04());
            }

            public void forceValidate() {}
          });
      new CustomizedColumns(new BigDecimal(192), taskController);

      // machineries lookup...
      macDataLocator.setGridMethodName("loadMachineries");
      macDataLocator.setValidationMethodName("validateMachineryCode");
      colMachCode.setLookupController(macController);
      colMachCode.setControllerMethodName("getMachineriesList");
      macController.setLookupDataLocator(macDataLocator);
      macController.setFrameTitle("machineries");
      macController.setLookupValueObjectClassName(
          "org.jallinone.production.machineries.java.MachineryVO");
      macController.addLookup2ParentLink("machineryCodePRO03", "machineryCodePro03PRO04");
      macController.addLookup2ParentLink("descriptionSYS10", "machineryDescriptionSYS10");
      macController.setAllColumnVisible(false);
      macController.setVisibleColumn("machineryCodePRO03", true);
      macController.setVisibleColumn("descriptionSYS10", true);
      macController.addLookupListener(
          new LookupListener() {

            public void codeValidated(boolean validated) {}

            public void codeChanged(ValueObject parentVO, Collection parentChangedAttributes) {}

            public void beforeLookupAction(ValueObject parentVO) {
              OperationVO vo = (OperationVO) parentVO;
              macDataLocator
                  .getLookupFrameParams()
                  .put(ApplicationConsts.COMPANY_CODE_SYS01, vo.getCompanyCodeSys01PRO04());
              macDataLocator
                  .getLookupValidationParameters()
                  .put(ApplicationConsts.COMPANY_CODE_SYS01, vo.getCompanyCodeSys01PRO04());
            }

            public void forceValidate() {}
          });

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
  private void jbInit() throws Exception {
    operationsGridControl.setValueObjectClassName(
        "org.jallinone.production.manufactures.java.OperationVO");
    this.setTitle(ClientSettings.getInstance().getResources().getResource("operations"));
    opPanel.setLayout(borderLayout1);
    opButtonsPanel.setLayout(flowLayout2);
    flowLayout2.setAlignment(FlowLayout.LEFT);
    operationsGridControl.setDeleteButton(deleteButton1);
    operationsGridControl.setEditButton(editButton1);
    operationsGridControl.setExportButton(exportButton1);
    operationsGridControl.setFunctionId("PRO04");
    operationsGridControl.setMaxNumberOfRowsOnInsert(50);
    operationsGridControl.setInsertButton(insertButton1);
    operationsGridControl.setReloadButton(reloadButton1);
    operationsGridControl.setSaveButton(saveButton1);
    colNote.setColumnName("notePRO04");
    colNote.setColumnRequired(false);
    colNote.setEditableOnEdit(true);
    colNote.setEditableOnInsert(true);
    colNote.setPreferredWidth(300);
    colDescr.setColumnDuplicable(true);
    colDescr.setColumnFilterable(true);
    colDescr.setColumnName("descriptionSYS10");
    colDescr.setColumnRequired(true);
    colDescr.setColumnSortable(false);
    colDescr.setEditableOnEdit(true);
    colDescr.setEditableOnInsert(true);
    colDescr.setPreferredWidth(200);
    colQty.setColumnDuplicable(true);
    colQty.setColumnFilterable(true);
    colQty.setColumnRequired(false);
    colQty.setEditableOnEdit(true);
    colQty.setEditableOnInsert(true);
    colQty.setPreferredWidth(60);
    colQty.setDecimals(5);
    colDuration.setColumnDuplicable(true);
    colDuration.setColumnFilterable(true);
    colDuration.setEditableOnEdit(true);
    colDuration.setEditableOnInsert(true);
    colDuration.setPreferredWidth(60);
    colValue.setColumnDuplicable(true);
    colValue.setColumnFilterable(true);
    colValue.setColumnSortable(true);
    colValue.setEditableOnEdit(true);
    colValue.setEditableOnInsert(true);
    colValue.setPreferredWidth(80);
    colTaskCode.setColumnDuplicable(true);
    colTaskCode.setColumnFilterable(true);
    colTaskCode.setColumnRequired(false);
    colTaskCode.setEditableOnEdit(true);
    colTaskCode.setEditableOnInsert(true);
    colTaskCode.setMaxCharacters(20);
    colTaskDescr.setColumnDuplicable(true);
    colTaskDescr.setColumnRequired(false);
    colTaskDescr.setPreferredWidth(150);
    colMachCode.setColumnDuplicable(true);
    colMachCode.setColumnFilterable(true);
    colMachCode.setColumnRequired(false);
    colMachCode.setEditableOnEdit(true);
    colMachCode.setEditableOnInsert(true);
    colMachCode.setMaxCharacters(20);
    colMachDescr.setColumnDuplicable(true);
    colMachDescr.setColumnRequired(false);
    colMachDescr.setPreferredWidth(150);

    colOpCod.setColumnFilterable(true);
    colOpCod.setColumnRequired(true);
    colOpCod.setEditableOnEdit(false);
    colOpCod.setEditableOnInsert(true);
    colOpCod.setMaxCharacters(20);
    colOpCod.setTrimText(true);
    colOpCod.setUpperCase(true);
    colOpCod.setColumnName("operationCodePRO04");

    this.getContentPane().add(opPanel, BorderLayout.CENTER);
    opPanel.add(opButtonsPanel, BorderLayout.NORTH);
    opButtonsPanel.add(insertButton1, null);
    opButtonsPanel.add(editButton1, null);
    opButtonsPanel.add(saveButton1, null);
    opButtonsPanel.add(reloadButton1, null);
    opButtonsPanel.add(deleteButton1, null);
    opButtonsPanel.add(exportButton1, null);
    opPanel.add(operationsGridControl, BorderLayout.CENTER);
    colCompanyCode.setColumnName("companyCodeSys01PRO04");
    colCompanyCode.setFunctionCode("PRO04");
    operationsGridControl.getColumnContainer().add(colCompanyCode, null);
    operationsGridControl.getColumnContainer().add(colOpCod, null);
    operationsGridControl.getColumnContainer().add(colDescr, null);
    operationsGridControl.getColumnContainer().add(colDuration, null);
    operationsGridControl.getColumnContainer().add(colValue, null);
    operationsGridControl.getColumnContainer().add(colTaskCode, null);
    operationsGridControl.getColumnContainer().add(colTaskDescr, null);
    operationsGridControl.getColumnContainer().add(colQty, null);
    operationsGridControl.getColumnContainer().add(colMachCode, null);
    operationsGridControl.getColumnContainer().add(colMachDescr, null);
    operationsGridControl.getColumnContainer().add(colNote, null);
    colQty.setColumnName("qtyPRO04");
    colDuration.setColumnName("durationPRO04");
    colValue.setColumnName("valuePRO04");
    colValue.setDynamicSettings(this);
    colTaskCode.setColumnName("taskCodeReg07PRO04");
    colTaskDescr.setColumnName("taskDescriptionSYS10");
    colMachCode.setColumnName("machineryCodePro03PRO04");
    colMachDescr.setColumnName("machineryDescriptionSYS10");
  }