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

transition paramaters between two portal components


In a portal application I have two portal components. In a portal component I have:


Object val=get_index.getSelection();




In the other one portal component I have:

Object value=request.getComponentSession().getValue("session_id");

The value is null.

What is wrong here ?

How could I do transiting a parameter from a portal component to other portal component in the same portal application ?

Best Regards.


Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Nov 24, 2004 at 09:59 AM

    Hi Altafin,

    I assume that you want to share the data for one user session, but between different components. So please use HTTP Session. The PortalComponentSession is bound to the - surprise surprise - component. And not shared between different components.

    Within the Java Developer Role, also see: Java Development - Documentation - Services - Basic Functionality - Beans.

    Hope it helps


    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Altafin,

      you have marked the question as answered and gave 10 points (thanks!), but from your answer I see that there are remaining problems, right?

      The problem is that SAP has mixed up some terms, not only against the J2EE rules but also very confusing within the portal sphere. The doc is not very well and really differentiating examples are missing. Most people learn this topiv by trial&error...

      Here, you just have to read carefully one thing:

      "In the portal the sphere for APPLICATION is defined as the portal component." Component! Not Application!

      And: The profile is component-dependent, this you can already realize from portalapp.xml.

      So it was the right choice to award 10 points for the last answer, because it should have solved your question more or less completely - use HTTP Session for your needs:

      First component:

      HttpSession session = request.getComponentSession().getHttpSession();
      session.setAttribute(("s_id", get_index.getSelection());

      Second component:

      HttpSession session = request.getComponentSession().getHttpSession();

      Hope it helps


      PS: Be aware of "s_id" used both times - in your example, you have used "s_id" to store and "index" to retrieve the value - this won't do even if the other problems wouldn't be there...

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.