// allows simple mispellings for developer productivity
if ("pagesize".equals(lowerCaseMethodName)) {
if (value != null) {
// find the user for this session-based operation
WebUser user = EnterpriseFacesContextUtility.getWebUser();
WebUserPreferences preferences = user.getWebPreferences();
// update it
PageControl pc = preferences.getPageControl(view);
int pageSize = (Integer) value;
if (pc.getPageSize() == pageSize) {
// nothing to do
if (log.isDebugEnabled()) {
log.debug("PageControlView[" + view + "] needs no changes " + pc);
}
} else {
pc.setPageSize(pageSize);
pc.setPageNumber(0); // reset the page number too
if (log.isDebugEnabled()) {
log.debug("Setting PageControlView[" + view + "] to " + pc);
}
preferences.setPageControl(view, pc);
}
}
// don't let other resolvers touch this
context.setPropertyResolved(true);
} else if ("pagenumber".equals(lowerCaseMethodName)) {
if (value != null) {
// find the user for this session-based operation
WebUser user = EnterpriseFacesContextUtility.getWebUser();
WebUserPreferences preferences = user.getWebPreferences();
// update it
PageControl pc = preferences.getPageControl(view);
int pageNumber = (Integer) value;
pc.setPageNumber(pageNumber - 1); // RF data table is 1-based, our PageControl is 0-based
if (log.isDebugEnabled()) {
log.debug("Setting PageControlView[" + view + "] to " + pc);
}
preferences.setPageControl(view, pc);
}
// don't let other resolvers touch this
context.setPropertyResolved(true);
} else {