Пример #1
0
  public String list() {
    List<PropertyFilter> propertyFilters =
        PropertyFilter.buildFromHttpRequest(ServletActionContext.getRequest());

    String userId =
        userConnector
            .findByUsername(SpringSecurityUtils.getCurrentUsername(), ScopeHolder.getUserRepoRef())
            .getId();
    propertyFilters.add(new PropertyFilter("EQL_userId", userId));
    page = docInfoManager.pagedQuery(page, propertyFilters);

    return SUCCESS;
  }
Пример #2
0
  public void exportExcel() throws Exception {
    List<PropertyFilter> propertyFilters =
        PropertyFilter.buildFromHttpRequest(ServletActionContext.getRequest());
    page = docInfoManager.pagedQuery(page, propertyFilters);

    List<DocInfo> docInfos = (List<DocInfo>) page.getResult();

    TableModel tableModel = new TableModel();
    tableModel.setName("doc info");
    tableModel.addHeaders("id", "name");
    tableModel.setData(docInfos);
    exportor.exportExcel(ServletActionContext.getResponse(), tableModel);
  }