Skip to Content
0
Former Member
Nov 06, 2006 at 01:34 PM

"getProperty" reading custom iView property returns null value

38 Views

Hello,

I have a custom iView property which is defined as follows in the portalapp.xml file:

<component name="TestProp">

<component-config>

</component-config>

<component-profile>

<property name="testprop" value="UK">

<property name="personalization" value="none"/>

<property name="type" value="select[UK,RU,FR]"/>

<property name="plainDescription" value="Context"/>

</property>

</component-profile>

</component>

I'm trying the access the property value from my Dynpage using the following code:

IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();

IPortalComponentContext context = request.getComponentContext();

IPortalComponentProfile profile = context.getProfile();

String propvalue = profile.getProperty("testprop");

The above code returns null value. Any idea where I'm going wrong?

Jav.