Skip to Content
author's profile photo Former Member
Former Member

How to read iView properties in JSP file?

Hello,

I have several iViews based on the same JSP file.

In the iView properties, I have added a parameter to pass from page request.

This parameter is different for every iView based on this single JSP file.

Now,

In the JSP file I want to read the value of this parameter and take some action based on this value.

In the iView properties, it says that the propertyID is "com.sap.portal.reserved.iview.ParamList".

How can I get a handle to this parameter list from the JSP file and read it?

I probably have to do something with this PropertyID, but I don't have a clue what?

Can somebody help me on this.

Thanks!

Stefan Beekman

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 23, 2005 at 02:56 PM

    Hi Stefan,

    > In the iView properties, I have added a parameter

    > In the JSP file

    > I want to read the value of this parameter

    > the propertyID is

    > "com.sap.portal.reserved.iview.ParamList".

    One of these sentences is wrong. I assume that you have <i>set a value on</i> (not: added) the (predefined) property com.sap.portal.reserved.iview.ParamList, right?

    And then your question is how to obtain the value of this property from the JSP behind it, when called.

    Before the JSP is called, probably a JSPDynPage will have been called. From within this, you can retrieve the IPortalComponentProfile from IPortalComponentContext, which again is accessible from IPortalComponentRequest (and this you have at hand).

    Read the parameter value from the profile, see http://media.sdn.sap.com/html/submitted_docs/60_sp2_javadocs/runtime/com/sapportals/portal/prt/component/IPortalComponentProfile.html and pass to JSP via some scope the value itself or packaged within some bean).

    Hope it helps

    Detlev

    PS: Please consider rewarding points if answers are helpful. Thanks in advance!

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Dominik,

      thanks, Dominik, this is one of the best demonstrations I've ever seen why coding should be avoided as much as possible in JSPs 😉

      If Stefan would have typed

      <% String myValue = componentRequest.getProfile().getProperty("myPropertyID"); %>

      no NWDS would complain about the missing <i>getComponentContext()</i> behind <i>componentRequest</i>. Dominik, no offence meant!

      Best regards

      Detlev

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.