Exemplo n.º 1
0
  /**
   * 设置工具条上按钮的可用性
   *
   * <p>Administrator 2010-5-15
   */
  private void setButtonStatus() {
    if (this.btnStatusList.size() == 0) {
      ButtonStatus bs = new ButtonStatus();
      bs.setButton(this.addButton);
      bs.addPageStatus(ZcSettingConstants.PAGE_STATUS_BROWSE);
      bs.addBillStatus(ZcSettingConstants.BILL_STATUS_ALL);
      btnStatusList.add(bs);

      bs = new ButtonStatus();
      bs.setButton(this.editButton);
      bs.addPageStatus(ZcSettingConstants.PAGE_STATUS_BROWSE);
      bs.addBillStatus(ZcSettingConstants.BILL_STATUS_ALL);
      btnStatusList.add(bs);

      bs = new ButtonStatus();
      bs.setButton(this.saveButton);
      bs.addPageStatus(ZcSettingConstants.PAGE_STATUS_EDIT);
      bs.addPageStatus(ZcSettingConstants.PAGE_STATUS_NEW);
      bs.addBillStatus(ZcSettingConstants.BILL_STATUS_ALL);
      btnStatusList.add(bs);

      bs = new ButtonStatus();
      bs.setButton(this.deleteButton);
      bs.addPageStatus(ZcSettingConstants.PAGE_STATUS_BROWSE);
      bs.addBillStatus(ZcSettingConstants.BILL_STATUS_ALL);
      btnStatusList.add(bs);

      bs = new ButtonStatus();
      bs.setButton(this.exitButton);
      bs.addPageStatus(ZcSettingConstants.PAGE_STATUS_ALL);
      bs.addBillStatus(ZcSettingConstants.BILL_STATUS_ALL);
      btnStatusList.add(bs);

      bs = new ButtonStatus();
      bs.setButton(this.previousButton);
      bs.addPageStatus(ZcSettingConstants.PAGE_STATUS_BROWSE);
      bs.addBillStatus(ZcSettingConstants.BILL_STATUS_ALL);
      btnStatusList.add(bs);

      bs = new ButtonStatus();
      bs.setButton(this.nextButton);
      bs.addPageStatus(ZcSettingConstants.PAGE_STATUS_BROWSE);
      bs.addBillStatus(ZcSettingConstants.BILL_STATUS_ALL);
      btnStatusList.add(bs);
    }
    EbSite obj = (EbSite) (this.listCursor.getCurrentObject());
    ZcUtil.setButtonEnable(
        this.btnStatusList,
        ZcSettingConstants.BILL_STATUS_ALL,
        this.pageStatus,
        this.listPanel.getCompoId(),
        obj.getProcessInstId());
  }
Exemplo n.º 2
0
 private void refreshData() {
   EbSite site = (EbSite) listCursor.getCurrentObject();
   if (site == null) { // 新增页面
     this.pageStatus = ZcSettingConstants.PAGE_STATUS_NEW;
     site = new EbSite();
     setDefualtValue(site, ZcSettingConstants.PAGE_STATUS_NEW);
     List lst = new ArrayList();
     lst.add(site);
     this.listCursor.setDataList(lst, -1);
   } else {
     site = ebayServiceDelegate.getebSiteByID(site.getSiteId(), requestMeta);
   }
   listCursor.setCurrentObject(site);
   this.setEditingObject(site);
   setOldObject();
   updateFieldEditorsEditable();
   setButtonStatus();
 }