Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

iView custom property

Hello,

i want to implement a custom property to an iView, which value should have an impact on the respective jsp defined in the portalapp.xml.

E.g.: I have added a HTMLB for Java gridlayout to a jsp:

<hbj:gridLayout id="test" width="500" cellspacing="2">

...

</hbj:gridLayout>

The width of the Grid should be customizeable as an iView property.

The component property entry of the portalapp.xml should look like this:

<property name="test_width" value="500" />

What value do i have to add to the jsp in order to use the value provided by the component property?

Would this work?

<hbj:gridLayout id="test" width=test_width cellspacing="2">

</hbj:gridLayout>

replied

Hi Markus,

Try this.

<%

IPortalComponentRequest currentRequest =

(IPortalComponentRequest) pageContext.getAttribute(javax.servlet.jsp.PageContext.REQUEST);

IPortalComponentContext componentContext =

currentRequest.getComponentContext();

IPortalComponentProfile profile = componentContext.getProfile();

String width = profile.getProperty("test_width");

%>

Use this width to set in the gridlayout width.

Include the necessary imports.

Hope this helps.

Regards,

Harini S

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question