if (lastSortCriterion != null) {
lastSortCriterion.setSubCriterion(sc);
}
lastSortCriterion = sc;
}
FilterCriterion processFilter = null;
if (nameFilter.length() > 0) {
processFilter = new PropertyEquality("name", nameFilter);
}
if (managerNameFilter.length() > 0) {
FilterCriterion fc = new PropertyEquality
("managerName", managerNameFilter);
if (processFilter == null) {
processFilter = fc;
} else {
processFilter = new AndOperation(processFilter, fc);
}
}
if (processKeyFilter.length() > 0) {
FilterCriterion fc
= new PropertyEquality ("key", processKeyFilter);
if (processFilter == null) {
processFilter = fc;
} else {
processFilter = new AndOperation(processFilter, fc);
}
}
if (contextVariable.length() > 0) {
FilterCriterion fc
= new ContextVariableEquality
(contextVariable, contextValue);
if (processFilter == null) {
processFilter = fc;
} else {
processFilter = new AndOperation(processFilter, fc);
}
}
FacesContext fc = FacesContext.getCurrentInstance();
PortletEnvironment portletEnv = (PortletEnvironment)
fc.getApplication().getVariableResolver().resolveVariable
(fc, "processPortletEnv");
Integer chunk = (Integer)
portletEnv.getPreferencesAsIntegers().get("displayedRows");
processesAsModel = new PaginatedDataModel
(pd.processes(processFilter, sortCriterion),