public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
{
response.write("This iView was last modified at:<br>");
// retrieve a property from the component profile
IPortalComponentContext componentContext = request.getComponentContext();
IPortalComponentProfile profile = componentContext.getProfile();
String lastChangedString= profile.getProperty("com.sap.portal.pcd.unit.LastChangedBy");
response.write(lastChangedString);
}
<component name="ProfileUsage">
<component-config>
<property name="ClassName" value="com.sap.portal.examples.ProfileUsage"/>
</component-config>
<component-profile>
<property name="com.sap.portal.mySampleProperty" value="My property Value"/>
</component-profile>
</component>
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
{
response.write("My sample property is: ");
// retrieve a property from the component profile
IPortalComponentContext componentContext = request.getComponentContext();
IPortalComponentProfile profile = componentContext.getProfile();
String myProfileProperty = profile.getProperty("com.sap.portal.mySampleProperty");
response.write(myProfileProperty);
//updating the profile property
profile.setProperty("com.sap.portal.mySampleProperty", "I've just changed this property!");
profile.store();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
38 | |
19 | |
14 | |
12 | |
10 | |
10 | |
10 | |
8 | |
8 | |
8 |