示例#1
0
  private void defautLazyLoading() {
    filterIssueType = "Any";
    filterIssuePriority = "Any";
    filterIssueStatus = "Any";

    issueStateLazyLoading = new IssueStateLazyLoading();

    lazyFilterInLists = new ArrayList<LazyFilterInList>();
    LazyFilterInList filterInList = new LazyFilterInList();
    filterInList.setField("type");
    filterInList.setValues("Task");
    lazyFilterInLists.add(filterInList);
    LazySorter lazySorter = new LazySorter();
    lazySorter.setField("subject");
    lazySorter.setValue(LAZYSORTER_VALUE.ASC);
    issueStateLazyLoading.setSorters(lazySorter);
    issueStateLazyLoading.setFilterInLists(lazyFilterInLists);
    issueStateLazyLoading.setLimit(20);
    issueStateLazyLoading.setStep(10);
    issueStateLazyLoading.setStart(0);
  }
示例#2
0
  public void sortIssue() {

    String dataField =
        FacesContext.getCurrentInstance()
            .getExternalContext()
            .getRequestParameterMap()
            .get("dataField");
    String currentValueSortField =
        FacesContext.getCurrentInstance()
            .getExternalContext()
            .getRequestParameterMap()
            .get("valueSortField");
    issueStateLazyLoading.getSorters().setField(dataField);
    if ("none".equals(currentValueSortField.toLowerCase())) {
      issueStateLazyLoading.getSorters().setValue(LAZYSORTER_VALUE.ASC);
    } else if ("asc".equals(currentValueSortField.toLowerCase())) {
      issueStateLazyLoading.getSorters().setValue(LAZYSORTER_VALUE.DESC);
    } else if ("desc".equals(currentValueSortField.toLowerCase())) {
      issueStateLazyLoading.getSorters().setValue(LAZYSORTER_VALUE.ASC);
    }
    updateIssueList();
  }
示例#3
0
  public void loadMoreIssue() {

    int currentLimit = issueStateLazyLoading.getLimit();
    issueStateLazyLoading.setLimit((currentLimit + issueStateLazyLoading.getStep()));
    updateIssueList();
  }