public String getTailedButtons() throws PureException {
    IAuth2Mgr authMgr = Auth2Helper.getManager();
    CitePaper citePaper = new CitePaper();
    boolean bHasRight = authMgr.hasRight(loginUser, citePaper, ArkActionTypes.BATCH_EDIT, false);

    if (bHasRight) {
      StringBuffer sbuff = new StringBuffer();
      sbuff.append("<BUTTON class=\"img_button\" onClick=\"if(count()<1)alert('请至少选择一项');");
      sbuff.append("else{");
      sbuff.append("mainForm.action='../citepaper/CitePaperBatchCitedList.do?");
      sbuff.append("';mainForm.submit();}\">");
      sbuff.append("<img src=\"../images/edit.gif\">批量关联</button>&nbsp;&nbsp;");
      return sbuff.toString();
    }
    return null;
  }
  /** @see com.pureinfo.ark.interaction.ActionBase#beforeExecution() */
  protected ActionForward beforeExecution() throws PureException {
    Product product = (Product) getSearchBean();
    SRMWebUtil.propertyAndOrSearch((SearchForm) form, request);

    String sProductForm = product.getProductForm();

    // 1. to validate the authorization
    IAuth2Mgr authMgr = Auth2Helper.getManager();
    ISQLLogic logic = authMgr.getSQLLogicRule(loginUser, product, ArkActionTypes.LIST);
    if (logic == SQLLogicString.FALSE) {
      String sDesc =
          (StringUtils.isEmpty(sProductForm)) ? "成果" : ProductConstants.getDescByForm(sProductForm);
      throw new PureException(ArkExceptionTypes.AUTH_NO_RIGHT, "对不起,您没有权限查看" + sDesc + "列表!");
    }

    // 2. to add the restriction
    QueryFilter filter = ((SearchForm) form).getQueryFilter();
    OrganizationHelper.addOrgTypeFilter(filter, request);
    /** 此处需要讨论 if (logic != SQLLogicString.TRUE) { filter.addCondition(logic); } */

    // 3. to parse some special parameters
    int nCurrRange = this.getRange();

    // 获奖与鉴定的年份小搜索是具体的年份

    if (StringUtils.isNotEmpty(sProductForm)) {
      if (sProductForm.equals(ProductConstants.SPRODUCT_FORM_HONOR)) {
        if (nCurrRange != 0) {
          filter.addCondition("year(publish_date)=" + nCurrRange);
          // filter.addOrder("{this.rank}");
        }
      } else if (sProductForm.equals(ProductConstants.SPRODUCT_FORM_APPRAISE)) {
        if (nCurrRange != 0) {
          filter.addCondition("{this.publicationYear}=" + nCurrRange);
        }
      } else {
        if (!(nCurrRange == RANGE_ALL)) {
          filter.addPropertyCondition(
              "this",
              "publishDate",
              SQLOperator.BETWEEN,
              new Date[] {getBeginYear(), getEndYear()});
        }
      }
    } else {
      String sPaperForm = request.getParameter("paperForm");
      if (sPaperForm != null) {
        if (sPaperForm.equals(ProductConstants.SPRODUCT_FORM_HONOR)) {
          filter.addPropertyCondition("this", "productForm", SQLOperator.EQUAL, sPaperForm);
          // filter.addOrder("{this.rank}");
        } else {
          String[] _sPaper =
              new String[] {
                ProductConstants.SPRODUCT_FORM_PAPER, ProductConstants.SPRODUCT_FORM_MONOGRAPH
              };
          filter.addPropertyCondition("this", "productForm", SQLOperator.IN, _sPaper);
          // 显示范围
          filter.addPropertyCondition(
              "this", "publishDate", SQLOperator.GREATER_OR_EQUAL, getBeginYear());
          filter.addPropertyCondition(
              "this", "publishDate", SQLOperator.LESS_OR_EQUAL, getEndYear());
        }
        String sOrderBy = request.getTrimedParameter("orderBy");
        if (sOrderBy == null || sOrderBy.length() == 0) {
          filter.setOrder("{this.lastModifiedTime} DESC, " + filter.getOrder());
        }
      }
    }

    // set default order for honor list and appraise list
    if (ProductConstants.SPRODUCT_FORM_HONOR.equals(sProductForm)
        || ProductConstants.SPRODUCT_FORM_APPRAISE.equals(sProductForm)) {
      String sOrderBy = request.getTrimedParameter("orderBy");
      if (sOrderBy == null || sOrderBy.length() == 0) {
        // filter.setOrder("YEAR({this.publishDate})
        // DESC,{this.level}");
        filter.setOrder("{this.rank},YEAR({this.publishDate}),{this.level}");
      }
    }

    return super.beforeExecution();
  }