RE: Storing Data across multiple requests

2004-03-26 Thread Jeremy Ford
Take a look at the class PortletSessionState.  With it you can do something 
like

PortletSessionState.setAttribute(portlet, rundata, "name", "value");

and then in another request

Object val = PortletSessionState.getAttribute(portlet, rundata, "name');

There are other helper methods as well.  Also, PortletConfigState is another 
helpful class when using the GenericMVC portlet.

Jeremy Ford
[EMAIL PROTECTED]

From: "Sprang, Henning (Firma CS)" <[EMAIL PROTECTED]>
Reply-To: "Jetspeed Users List" <[EMAIL PROTECTED]>
To: "Jetspeed Users List (E-Mail)" <[EMAIL PROTECTED]>
Subject: Storing Data across multiple requests
Date: Fri, 26 Mar 2004 10:11:45 +0100
Hy,
I am currently developing my first of a bunch of portlets on the jetspeed 
1.4 platform
(with the intent to switch to 1.5 as soon as the next beta release will be 
available).
I've chosen to implement the MVC pattern and want to use jsp as the view 
technology.

In this setting i subclass GenericMVCAction for my action handling and let 
my
Logic class store the data for the view in the context that I have 
available
in my Action class and transferred from there to the logic class.

Now, it would be desireable, to have the data in that context available 
throughout
multiple http requests of my portlet ( it would save me, for example, doing 
database
requests again and again when i am only paging through multiple pages of 
the same result)
and I assumed, GenericMVCContext would work like that. But I see, it 
doesn't, because
everything i store in the context on one request is gone with the next one.

Is there a way to make GenericMVCContext persistent throughout mutliple 
requests?

Thanks,
Henning
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Find a broadband plan that fits. Great local deals on high-speed Internet 
access. 
https://broadband.msn.com/?pgmarket=en-us/go/onm00200360ave/direct/01/

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


Storing Data across multiple requests

2004-03-26 Thread Sprang, Henning (Firma CS)
Hy,
I am currently developing my first of a bunch of portlets on the jetspeed 1.4 platform 
(with the intent to switch to 1.5 as soon as the next beta release will be available).
I've chosen to implement the MVC pattern and want to use jsp as the view technology.

In this setting i subclass GenericMVCAction for my action handling and let my
Logic class store the data for the view in the context that I have available
in my Action class and transferred from there to the logic class.

Now, it would be desireable, to have the data in that context available throughout
multiple http requests of my portlet ( it would save me, for example, doing database
requests again and again when i am only paging through multiple pages of the same 
result)
and I assumed, GenericMVCContext would work like that. But I see, it doesn't, because
everything i store in the context on one request is gone with the next one.

Is there a way to make GenericMVCContext persistent throughout mutliple requests?

Thanks,
Henning

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