// get the variables needed to calculate oldStart, oldEnd,
// newStart, newEnd.
int rowCount = choiceBar.getRowCount();
int rows = choiceBar.getRows();
FacesBean bean = getFacesBean(choiceBar);
boolean isShowAll = getShowAll(choiceBar, bean);
// calculate oldStart and oldEnd
int increment = (isShowAll && rowCount > -1) ? rowCount : rows;
int oldStart = choiceBar.getFirst();
int oldEnd = oldStart + increment;
// calculate newStart and newEnd
// initialize showAll to its default state. We will change
// this later if the event's value is "all".
if (isShowAll)
bean.setProperty(_showAllKey, Boolean.FALSE);
int newStart = -1;
int newEnd = -1;
if (valueParam != null)
{
String newStartString = valueParam.toString();
// We get "all" if the user selected the "Show All" option.
// If so, set showAll to true and set newStart and newEnd to
// be the entire range.
if (newStartString.equals(XhtmlConstants.VALUE_SHOW_ALL))
{
bean.setProperty(_showAllKey, Boolean.TRUE);
newStart = 0;
newEnd = rowCount;
}
else
{