Michael Boss wrote:
Hi All,

I have two Portlets. One transfers data to another. For example I
transfer attribute "name":

PortletSession session = request.getPortletSession();
String name = "TestName";
session.setAttribute("mf_name", name,PortletSession.PORTLET_SCOPE);

And another portlet receives this attribute:

PortletSession session = request.getPortletSession();
String name = (String) session.getAttribute("mf_name",
PortletSession.APPLICATION_SCOPE);
System.out.println("Name: "+name); Here I receive null (name=null).

What is wrong? What I do incorrectly?
Please don't cross-post to both user and developer lists.
I, and probably most or even all other subscribers to the developer list are 
subscribed to the user list too!

Now, for your problem:
you use the wrong scope (PORTLET_SCOPE) for setting the attribute, use 
APPLICATION_SCOPE.


Many thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to