[jboss-user] [JBoss Portal] - IPC using application variables

louise_za do-not-reply at jboss.com
Fri Jan 5 07:04:53 EST 2007


Hi everyone
I have 2 porlets on a portal page. I would like Portlet A to set an application variable when a link is clicked in the portlet's body. Portlet B must then read this variable and display it. The problem is that Portlet B renders before Portlet A and the variable it displays is consequently always 1 step behind what A set.

The code in Portlet A to set the variable is in the processAction method and looks as follows:

  | String id = aRequest.getParameter("id");
  | aResponse.setRenderParameter("id", id);
  | PortletSession ps = aRequest.getPortletSession();
  | ps.setAttribute("id", id, PortletSession.APPLICATION_SCOPE);
  | 

The code in Portlet B (in the jsp page):

  | String object_id = (String)request.getSession().getAttribute("id");
  | 

Is there something that I am doing wrong or is this just a limitation in the portal architechture?
(I am using JBoss portal 2.2 bundled)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998227#3998227

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998227



More information about the jboss-user mailing list