on 07-22-2005 2:17 AM
I have a jspdynpage Iview. I would like to set some personalization parameters & read it in doInitialization() method of jspdynpage. I tried setting the parameter of iView called parameters to Pass from Page Request. I tried both url & embedded isolation method. I am not able to read the value of the parameter in doInitialization(). I always get null. How do I personalize iView?
Here is my portalapp.xml
-
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
</application-config>
<components>
<component name="test_event_controller">
<component-config>
<property name="ClassName" value="com.documentum.ei.epiviews.test_event_controller"/>
<property name="SecurityZone" value="com.documentum.ei.epiviews.test_event_controller/low_safety"/>
<property name="com.sap.portal.reserved.iview.ParamList" value="*"/>
</component-config>
<component-profile/>
</component>
</application>
Here is the JSPDynPage code:
public static class dctm_test_jspdynpage2DynPage extends JSPDynPage {
public void doInitialization() {
IPortalComponentRequest request =
(IPortalComponentRequest) this.getRequest();
String parameter = request.getParameter("p1");
}
}
I clicked on the personalize option on the iView & set following attribute:
Parameters to Pass from Page Request to p1=test123 (without double quotes)
I tried changing the portalapp.xml & added code to retrieve profile parameters in my code. But I still don't get the value of p1. Am I suppose to see the p1 attribute in personlization dialog? I don't see it. Also the value is null. I ALSO tried <property name="p1" value="testing"> but I still get null.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
My fault, i had a mistake in my portalapp.xml. I am missing </property> tag. The correct portalapp.xml is following.
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
</application-config>
<components>
<component name="test_event_controller">
<component-config>
<property name="ClassName" value="com.documentum.ei.epiviews.test_event_controller"/>
<property name="SecurityZone" value="com.documentum.ei.epiviews.test_event_controller/low_safety"/>
</component-config>
<component-profile>
<property name="p1" value="">
<property name="personalization" value="dialog"/>
<b></property></b>
</component-profile>
</component>
</application>
PS: Please reward points for helpful answer or problem is resolved. thank you
thanks I had a typo in my portalapp.xml. It's working now. 10 points awarded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
You need to do the following.
1. Your portalapp.xml is incorrect. you need to fix that first. it should look like following.
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
</application-config>
<components>
<component name="test_event_controller">
<component-config>
<property name="ClassName" value="com.documentum.ei.epiviews.test_event_controller"/>
<property name="SecurityZone" value="com.documentum.ei.epiviews.test_event_controller/low_safety"/>
</component-config>
<component-profile>
<property name="p1" value="">
<property name="personalization" value="dialog"/>
</component-profile>
</component>
</application>
2. In your doInitialization() add the following code.
PortalComponentRequest request =
(IPortalComponentRequest) this.getRequest();
IPortalComponentContext myContext = request.getComponentContext();
IPortalComponentProfile profile = myContext.getProfile();
String parameter = profile.getProperty("p1");
PS: Please reward points for helpful answer or problem is resolved. thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sam,
You need to do the following.
1. Your portalapp.xml is incorrect. you need to fix that first. it should look like following.
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="PrivateSharingReference" value="com.sap.portal.htmlb"/>
</application-config>
<components>
<component name="test_event_controller">
<component-config>
<property name="ClassName" value="com.documentum.ei.epiviews.test_event_controller"/>
<property name="SecurityZone" value="com.documentum.ei.epiviews.test_event_controller/low_safety"/>
</component-config>
<component-profile>
<property name="p1" value="">
<property name="personalization" value="dialog"/>
</component-profile>
</component>
</application>
2. In your doInitialization() add the following code.
PortalComponentRequest request =
(IPortalComponentRequest) this.getRequest();
IPortalComponentContext myContext = request.getComponentContext();
IPortalComponentProfile profile = myContext.getProfile();
String parameter = profile.getProperty("p1");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.