Example: Pass in parameters for an Interview Portlet across WSRP
We provide a sample implementation of a parameter setting portlet in the examples/interview-portlet/parameter-setting path of your Oracle Policy Automation Runtime Java implementation.
The portlet consists of a Java class ExampleParameterSettingPortlet and a deployment descriptor portlet.xml.
Note: In order to compile the Java class you will need an implementation of the JSR268 API.
For each parameter that the portlet wishes to set:
- portlet.xml contains:
- A supported-public-render-parameter element, nested inside the portlet element
- A public-render-parameter element, nested inside the portlet-app element.
The namespace for each parameter needs to be http://oracle.com/opa/interview/portlet/10.0 (that is, it needs to match the appropriate namespace defined in the interview portlet's portlet.xml).
- The Java code sets every parameter using response.setRenderParameter("param", request.getParameter("param")); where "param" is the parameter name as defined in portlet.xml
To use this parameter setting example:
- Deploy the parameter setting portlet (use either examples/interview-portlet/parameter-setting/ExampleParameterSettingPortlet.war or compile your own as per the guidelines above).
- Deploy the Oracle Policy Automation Interview Portlet
- Place the parameter setting portlet and the Oracle Policy Automation Interview Portlet on the same page
- Input the parameters in the parameter setting portlet, and click the Submit button to pass parameters to the Oracle Policy Automation Interview Portlet