// œr private ’ protected protected void init(IWContext iwc) { this.form = new Form(); this.searchString = iwc.getParameter(this.PARAMETER_SEARCH); this.iwrb = iwc.getIWMainApplication() .getBundle(BuilderConstants.STANDARD_IW_BUNDLE_IDENTIFIER) .getResourceBundle(iwc); this.showAll = iwc.isParameterSet(this.PARAMETER_VIEW_ALL); if (iwc.isParameterSet(this.PARAMETER_CURRENT_PAGE)) { this.currentPage = Integer.parseInt(iwc.getParameter(this.PARAMETER_CURRENT_PAGE)); } // int start = currentPage * USERS_PER_PAGE; try { String useUserPks = (String) iwc.getSessionAttribute(USING_AVAILABLE_USER_PKS_SESSION_PARAMETER); if (useUserPks != null) { this.usingUserPks = true; } Collection availableUserPks = (Collection) iwc.getSessionAttribute(AVAILABLE_USER_PKS_SESSION_PARAMETER); String[] userIds = null; if (this.usingUserPks && availableUserPks != null) { userIds = new String[availableUserPks.size()]; Iterator iter = availableUserPks.iterator(); int counter = 0; while (iter.hasNext()) { Object i = iter.next(); userIds[counter++] = i.toString(); } } if (this.usingUserPks && this.searchString == null) { this.showAll = true; } UserHome uHome = (UserHome) IDOLookup.getHome(User.class); if (this.showAll) { if (this.usingUserPks && userIds != null) { this.users = uHome.findUsers(userIds); } else { this.users = uHome.findAllUsersOrderedByFirstName(); } } else if (this.searchString != null) { this.users = uHome.findUsersBySearchCondition(this.searchString, userIds, false); } } catch (Exception e) { e.printStackTrace(System.err); } }