taylor 2004/04/01 17:03:37
Modified: applications/demo/src/java/org/apache/jetspeed/demo/customerInfo
CustomerPortlet.java
Log:
trying out application scope for session variables
bug is JS2-1 is still there, narrowing it down
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.3 +8 -2
jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/customerInfo/CustomerPortlet.java
Index: CustomerPortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/applications/demo/src/java/org/apache/jetspeed/demo/customerInfo/CustomerPortlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CustomerPortlet.java 8 Mar 2004 00:03:59 -0000 1.2
+++ CustomerPortlet.java 2 Apr 2004 01:03:37 -0000 1.3
@@ -140,8 +140,14 @@
PortletSession portletSession = request.getPortletSession();
if (portletSession != null)
{
- customerList = (List) portletSession.getAttribute("CustomerList");
+ customerList = (List) portletSession.getAttribute("CustomerList",
PortletSession.APPLICATION_SCOPE);
+ if (customerList == null)
+ {
+ customerList = this.defaultCustomers;
+ portletSession.setAttribute("CustomerList", this.defaultCustomers,
PortletSession.APPLICATION_SCOPE);
+ }
}
+
else
{
// TODO: the portletSession == null?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]