/** * Access the parameter names. * * @return An Iterator of parameter names (String). */ public Properties getProperties() { Properties retval = new Properties(); Iterator<String> names = getNames(); while (names.hasNext()) { String name = names.next(); retval.setProperty(name,getString(name)); } return retval; }
/** * Access the parameter names. * * @return An Iterator of parameter names (String). */ public Properties getProperties() { Properties retval = new Properties(); Iterator<String> names = getNames(); while (names.hasNext()) { String name = names.next(); retval.setProperty(name,getString(name)); } return retval; }
/** * Process a Portlet action. */ @SuppressWarnings("unchecked") protected void processAction(HttpServletRequest req, HttpServletResponse res) { // see if there's an action parameter, whose value has the action to use String action = ((ParameterParser) req.getAttribute(ATTR_PARAMS)).getString(PARAM_ACTION); // if that's not present, see if there's a combination name with the action encoded in the name if (action == null) { Enumeration<String> names = req.getParameterNames(); while (names.hasMoreElements()) { String name = names.nextElement(); if (name.startsWith(PARAM_ACTION_COMBO)) { action = name.substring(PARAM_ACTION_COMBO.length()); break; } } } // process the action if present if (action != null) { actionDispatch("processAction", action, req, res); } } // processAction
/** * Process a Portlet action. */ @SuppressWarnings("unchecked") protected void processAction(HttpServletRequest req, HttpServletResponse res) { // see if there's an action parameter, whose value has the action to use String action = ((ParameterParser) req.getAttribute(ATTR_PARAMS)).getString(PARAM_ACTION); // if that's not present, see if there's a combination name with the action encoded in the name if (action == null) { Enumeration<String> names = req.getParameterNames(); while (names.hasMoreElements()) { String name = names.nextElement(); if (name.startsWith(PARAM_ACTION_COMBO)) { action = name.substring(PARAM_ACTION_COMBO.length()); break; } } } // process the action if present if (action != null) { actionDispatch("processAction", action, req, res); } } // processAction
/** * Handle a view indecated page request */ public void doView_page(RunData runData, Context context) { // access the portlet element id to find our state String peid = ((JetspeedRunData) runData).getJs_peid(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid); // set the flag to go to the next item on the next view String page = runData.getParameters().getString(FORM_PAGE_NUMBER); state.setAttribute(STATE_GOTO_PAGE, new Integer(page)); } // doView_page
/** * Handle a view indecated page request */ public void doView_page(RunData runData, Context context) { // access the portlet element id to find our state String peid = ((JetspeedRunData) runData).getJs_peid(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid); // set the flag to go to the next item on the next view String page = runData.getParameters().getString(FORM_PAGE_NUMBER); state.setAttribute(STATE_GOTO_PAGE, new Integer(page)); } // doView_page
/** * Handle a view indecated page request */ public void doView_page(RunData runData, Context context) { // access the portlet element id to find our state String peid = ((JetspeedRunData) runData).getJs_peid(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid); // set the flag to go to the next item on the next view String page = runData.getParameters().getString(FORM_PAGE_NUMBER); state.setAttribute(STATE_GOTO_PAGE, new Integer(page)); } // doView_page
/** * Handle a view indecated page request */ public void doView_page(RunData runData, Context context) { // access the portlet element id to find our state String peid = ((JetspeedRunData) runData).getJs_peid(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid); // set the flag to go to the next item on the next view String page = runData.getParameters().getString(FORM_PAGE_NUMBER); state.setAttribute(STATE_GOTO_PAGE, new Integer(page)); } // doView_page
/** * Handle a request to change the page-size. */ public void doChange_pagesize(RunData runData) { // access the portlet element id to find our state String peid = ((JetspeedRunData) runData).getJs_peid(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid); ParameterParser params = runData.getParameters(); String pagesize = params.getString("selectPageSize"); Integer size = Integer.valueOf(pagesize); state.setAttribute(STATE_PAGESIZE, size); }
/** * Handle a request to change the page-size. */ public void doChange_pagesize(RunData runData) { // access the portlet element id to find our state String peid = ((JetspeedRunData) runData).getJs_peid(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(peid); ParameterParser params = runData.getParameters(); String pagesize = params.getString("selectPageSize"); Integer size = Integer.valueOf(pagesize); state.setAttribute(STATE_PAGESIZE, size); }
/** * Handle a request to change the page size of search list. */ public void doChange_pagesize(RunData data, Context context) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); String newPageSize = data.getParameters().getString("selectPageSize"); if (newPageSize == null) { state.setAttribute(STATE_PAGESIZE, new Integer(DEFAULT_PAGE_SIZE)); state.setAttribute("inter_size", new Integer(DEFAULT_PAGE_SIZE)); } else { state.setAttribute(STATE_PAGESIZE, Integer.valueOf(newPageSize)); state.setAttribute("inter_size", Integer.valueOf(newPageSize)); } } // doChange_pagesize
/** * Handle a request to change the page size of search list. */ public void doChange_pagesize(RunData data, Context context) { SessionState state = ((JetspeedRunData) data).getPortletSessionState(((JetspeedRunData) data).getJs_peid()); String newPageSize = data.getParameters().getString("selectPageSize"); if (newPageSize == null) { state.setAttribute(STATE_PAGESIZE, new Integer(DEFAULT_PAGE_SIZE)); state.setAttribute("inter_size", new Integer(DEFAULT_PAGE_SIZE)); } else { state.setAttribute(STATE_PAGESIZE, Integer.valueOf(newPageSize)); state.setAttribute("inter_size", Integer.valueOf(newPageSize)); } } // doChange_pagesize
if (params.getString(entry.getReference()) != null)
if (params.getString(entry.getReference()) != null)
/** * Handle a request to set options. */ public void doOptions(RunData runData, Context context) { // ignore if not allowed if (!allowedToOptions()) { return; //msg = "you do not have permission to set options for this Worksite."; } Placement placement = ToolManager.getCurrentPlacement(); String pid = null; if (placement != null) pid = placement.getId(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(pid); // go into options mode state.setAttribute(STATE_MODE, MODE_OPTIONS); // disable auto-updates while editing disableObservers(state); // if we're not in the main panel for this tool, schedule an update of the main panel String currentPanelId = runData.getParameters().getString(ActionURL.PARAM_PANEL); if (!LAYOUT_MAIN.equals(currentPanelId)) { String mainPanelId = mainPanelUpdateId(pid); schedulePeerFrameRefresh(mainPanelId); } } // doOptions
String search = StringUtils.trimToNull(runData.getParameters().getString(FORM_SEARCH));
String search = StringUtils.trimToNull(runData.getParameters().getString(FORM_SEARCH));
/** * Handle a request to set options. */ public void doOptions(RunData runData, Context context) { // ignore if not allowed if (!allowedToOptions()) { return; //msg = "you do not have permission to set options for this Worksite."; } Placement placement = ToolManager.getCurrentPlacement(); String pid = null; if (placement != null) pid = placement.getId(); SessionState state = ((JetspeedRunData) runData).getPortletSessionState(pid); // go into options mode state.setAttribute(STATE_MODE, MODE_OPTIONS); // disable auto-updates while editing disableObservers(state); // if we're not in the main panel for this tool, schedule an update of the main panel String currentPanelId = runData.getParameters().getString(ActionURL.PARAM_PANEL); if (!LAYOUT_MAIN.equals(currentPanelId)) { String mainPanelId = mainPanelUpdateId(pid); schedulePeerFrameRefresh(mainPanelId); } } // doOptions
String search = StringUtils.trimToNull(runData.getParameters().getString(FORM_SEARCH));
String search = StringUtils.trimToNull(runData.getParameters().getString(FORM_SEARCH));