コード例 #1
0
  private void exportFile() {
    try {
      boolean currentRowOnly = chkCurrentRow.isSelected();
      File file =
          File.createTempFile("Export", "." + cboType.getSelectedItem().getValue().toString());
      childs.clear();
      for (Checkbox chkSeletionTab : chkSelectionTabForExport) {
        if (chkSeletionTab.isChecked()) {
          childs.add((GridTab) chkSeletionTab.getAttribute("tabBinding"));
        }
      }

      exporter.export(panel.getActiveGridTab(), childs, currentRowOnly, file, indxDetailSelected);

      winExportFile.onClose();
      winExportFile = null;
      AMedia media = null;
      media =
          new AMedia(
              exporter.getSuggestedFileName(panel.getActiveGridTab()),
              null,
              exporter.getContentType(),
              file,
              true);
      Filedownload.save(media);
    } catch (Exception e) {
      throw new AdempiereException(e);
    } finally {
      if (winExportFile != null) winExportFile.onClose();
    }
  }
コード例 #2
0
 /** Zoom */
 public void zoom() {
   log.info("");
   Integer C_Order_ID = getSelectedRowKey();
   if (C_Order_ID == null) return;
   MQuery query = new MQuery("C_Order");
   query.addRestriction("C_Order_ID", MQuery.EQUAL, C_Order_ID);
   query.setRecordCount(1);
   int AD_WindowNo = getAD_Window_ID("C_Order", isSoTrx.isSelected());
   AEnv.zoom(AD_WindowNo, query);
 } //	zoom
コード例 #3
0
ファイル: WPaySelect.java プロジェクト: kimhatrung/Adempiere
  /** Query and create TableInfo */
  private void loadTableInfo() {
    Timestamp payDate = (Timestamp) fieldPayDate.getValue();
    miniTable.setColorCompare(payDate);
    log.config("PayDate=" + payDate);

    BankInfo bi = (BankInfo) fieldBankAccount.getSelectedItem().getValue();

    ValueNamePair paymentRule = (ValueNamePair) fieldPaymentRule.getSelectedItem().getValue();
    KeyNamePair bpartner = (KeyNamePair) fieldBPartner.getSelectedItem().getValue();
    KeyNamePair docType = (KeyNamePair) fieldDtype.getSelectedItem().getValue();

    loadTableInfo(bi, payDate, paymentRule, onlyDue.isSelected(), bpartner, docType, miniTable);

    calculateSelection();
  } //  loadTableInfo