| java.lang.Object com.nabhinc.portlet.mvcportlet.core.BaseRequestProcessor com.nabhinc.portlet.mvcportlet.actionprocessor.PreferenceSetter
PreferenceSetter | public class PreferenceSetter extends BaseRequestProcessor implements ActionProcessor(Code) | | Sets portlet preference values from request parameters/session attributes.
The action processor is configured as follows:
param1,param2,param3
scopeString
pref1,pref2,pref3
"params" is a comma separated list of request parameters.
"scope" must be request , portlet_session , application_session
or portlet_context . The scope applies to the parameter names. In case of session scopes
the parameter names are interpreted as session attribute names.
If the "scope" is not set, and this processor is mapped to a form, then the
form element's scope, if specified, will be used. Otherwise, request scope is
assumed.
"prefs" is a comma separated list of preference names. If this is ommitted
attribute names are assumed to be the same names as the parameter names.
This processor returns "success" if preference are valid and saved successfully. It returns
"preference-validation-error" if ValidatorException is thrown during the store call on
preferences. The request parameter Constants.ERROR_MESSAGE_PARAM + request.getPortletMode()
is set to the localized value of the error message.
author: Padmanabh Dabke author: (c) 2005 Nabh Information Systems, Inc. All Rights Reserved. since: 0.9.1 |
Method Summary | |
public void | init(Element config, ControllerPortletConfig controllerConfig) Requires params element to be specified. | public String | process(ActionRequest request, ActionResponse response, ActionConfig actionConfig) Processes the request's parameters and sets them as attributes to the
specified scope. |
process | public String process(ActionRequest request, ActionResponse response, ActionConfig actionConfig) throws PortletException, IOException(Code) | | Processes the request's parameters and sets them as attributes to the
specified scope. success is always returned.
Parameters: request - Parameters: response - Parameters: actionConfig - success throws: PortletException - throws: IOException - |
|
|