当前位置: 首页>>代码示例>>Java>>正文


Java SortOrder类代码示例

本文整理汇总了Java中org.primefaces.model.SortOrder的典型用法代码示例。如果您正苦于以下问题:Java SortOrder类的具体用法?Java SortOrder怎么用?Java SortOrder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SortOrder类属于org.primefaces.model包,在下文中一共展示了SortOrder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@PostConstruct
private void init(){
    //initialize user acc
    userAcc = usb.getUser();
    model = new LazyDataModel<Job>() {
        private static final long serialVersionUID = 1L;

        @Override
        public List<Job> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) {
            List<Job> jobs;
            int count;
            if (showAll && isAdminPrivileges()){
                jobs = jobFacade.findAllJobsPaginated(first, pageSize);
                count = jobFacade.count();
            } else {
                jobs = jobFacade.findUserJobsPaginated(userAcc, first, pageSize);//sorting and filtering will not be used
                count = (int)(long)jobFacade.countUserJobs(userAcc);
            }
            model.setRowCount(count);
            return jobs;
        }
    
        
    };
}
 
开发者ID:vodev,项目名称:vocloud,代码行数:26,代码来源:JobListBean.java

示例2: load

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
public List<T> load(int first, int pageSize, String sortField, SortOrder sortOrder,
                    Map<String, Object> filters) {
    AdminSort order = null;
    if (sortOrder != null) {
        order = sortOrder.equals(SortOrder.ASCENDING) ? AdminSort.ASCENDING
                : sortOrder.equals(SortOrder.DESCENDING) ? AdminSort.DESCENDING
                : AdminSort.UNSORTED;
    }

    if (filters == null || filters.isEmpty() && keepFiltersInSession) {
        filters = filter.getParams();
    }

    filter.setFirst(first).setPageSize(pageSize)
            .setSortField(sortField).setAdminSort(order)
            .setParams(filters);
    List<T> list = crudService.paginate(filter);
    setRowCount(crudService.count(filter).intValue());
    return list;
}
 
开发者ID:adminfaces,项目名称:admin-persistence,代码行数:22,代码来源:AdminDataModel.java

示例3: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
public static List<SortMeta> buildSortOrder(String colPath, String colId, SortOrder sortOrder) {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();

    UIComponent column = viewRoot.findComponent(colPath);
    if (column != null) {
        SortMeta sm1 = new SortMeta();
        sm1.setSortBy((UIColumn) column);
        sm1.setSortField(colId);
        sm1.setSortOrder(sortOrder);

        results.add(sm1);

        return results;
    }

    return null;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:20,代码来源:DataTableUtil.java

示例4: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtStudySubjects:colStudySubjectId");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colStudySubjectId");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:StudySubjectBean.java

示例5: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtSubjects:colStudySubjectId");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colStudySubjectId");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:RandomisationBean.java

示例6: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtEntities:colSoftwareName");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colSoftwareName");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:SoftwareBean.java

示例7: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
/**
 * Need to build an initial sort order for data table multi sort
 */
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtEntities:colUserName");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colUserName");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:20,代码来源:UserAccountBean.java

示例8: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtEntities:colName");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colName");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:AnnotationTypeBean.java

示例9: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtRecords:colSourceLabel");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colSourceLabel");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:MappingRecordBean.java

示例10: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtEntities:colStructTypeName");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colStructTypeName");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:StructTypeBean.java

示例11: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtEntities:colStatusName");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colStatusName");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:PersonStatusBean.java

示例12: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtEntities:colSponsoringTypeName");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colSponsoringTypeName");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:SponsoringTypeBean.java

示例13: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtEntities:colPhaseName");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colPhaseName");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:StudyPhaseBean.java

示例14: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtStudies:colStudyOcIdentifier");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colStudyOcIdentifier");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:StudyManagementBean.java

示例15: buildSortOrder

import org.primefaces.model.SortOrder; //导入依赖的package包/类
@Override
protected List<SortMeta> buildSortOrder() {
    List<SortMeta> results = new ArrayList<SortMeta>();

    UIViewRoot viewRoot =  FacesContext.getCurrentInstance().getViewRoot();
    UIComponent column = viewRoot.findComponent(":form:tabView:dtEntities:colRoleName");

    SortMeta sm1 = new SortMeta();
    sm1.setSortBy((UIColumn) column);
    sm1.setSortField("colRoleName");
    sm1.setSortOrder(SortOrder.ASCENDING);

    results.add(sm1);

    return results;
}
 
开发者ID:ddRPB,项目名称:rpb,代码行数:17,代码来源:StudyPersonRoleBean.java


注:本文中的org.primefaces.model.SortOrder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。