コード例 #1
0
  /**
   * Method invoked when the user has clicked on delete button and the grid is in READONLY mode.
   *
   * @param persistentObjects value objects to delete (related to the currently selected rows)
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is
   *     successfully completed
   */
  public Response deleteRecords(ArrayList persistentObjects) throws Exception {
    AccountVO vo = null;
    for (int i = 0; i < persistentObjects.size(); i++) {
      vo = (AccountVO) persistentObjects.get(i);
      if (!vo.getCanDelACC02().booleanValue()) return new ErrorResponse("deleting not allowed");
    }

    return ClientUtils.getData("deleteAccounts", persistentObjects);
  }
コード例 #2
0
 /**
  * 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 {
   AccountVO vo = (AccountVO) valueObject;
   vo.setCompanyCodeSys01ACC02(gridFrame.getControlCompaniesCombo().getValue().toString());
   vo.setLedgerCodeAcc01ACC02(gridFrame.getControlLedgerCode().getValue().toString());
   vo.setLedgerDescriptionACC02(gridFrame.getControlLedgerDescr().getValue().toString());
 }