-
1. Re: Saving object in PortletSession
herveminko Jan 30, 2007 8:11 AM (in response to herveminko)Even when i use the statement ArrayList myObjects2 = session.get("obj", PortletSession.APPLICATION_SCOPE) from another Portlet on the same page , i am not able to retreive my saved objects, because of the added prefix "jbp19367721"
-
2. Re: Saving object in PortletSession
ckeswani Jan 30, 2007 8:13 AM (in response to herveminko)"herveminko" wrote:
Hi guys,
After doing this, i want to retrieve my saved objects with the statement:
ArrayList<MyObjects> myObjects2 = session.get("obj");
I imagine you've solved this by now, but just in case you haven't:
Since you stored in in APPLICATION_SCOPE you must retrieve it with APPLICATION_SCOPE, so to get the object back your code should look likesession.getAttribute("obj", PortletSession.APPLICATION_SCOPE);
-
3. Re: Saving object in PortletSession
herveminko Jan 30, 2007 8:44 AM (in response to herveminko)I'm triying to retrieve my object from the portlet session with the statement:
session.getAttribute("obj", PortletSession.APPLICATION_SCOPE), but i still get a null object back, because the key of the object is not "obj", but "jbp11462467obj". I don't know why this key is prefixed (jbp11462467) in the PortletSession. -
4. Re: Saving object in PortletSession
herveminko Jan 30, 2007 9:12 AM (in response to herveminko)I found another forum topic, with a similar issue (http://www.jboss.org/index.html?module=bb&op=viewtopic&t=65630&view=previous). Unfortunately there was no answer. Is it perhaps an open bug in JBoss Portal 2.0 or 2.2.1) ? Does somebody have an idea about it?