[seam-commits] Seam SVN: r15255 - branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Oct 11 10:22:23 EDT 2012


Author: manaRH
Date: 2012-10-11 10:22:22 -0400 (Thu, 11 Oct 2012)
New Revision: 15255

Modified:
   branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui/ClientUidSelector.java
Log:
JBSEAM-4701 - added forgotten lines

Modified: branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui/ClientUidSelector.java
===================================================================
--- branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui/ClientUidSelector.java	2012-10-11 14:22:13 UTC (rev 15254)
+++ branches/enterprise/WFK-2_1/jboss-seam-ui/src/main/java/org/jboss/seam/ui/ClientUidSelector.java	2012-10-11 14:22:22 UTC (rev 15255)
@@ -28,7 +28,12 @@
    @Create
    public void onCreate()
    {
-      setCookiePath(FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath());
+      String requestContextPath = FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
+      if (requestContextPath.isEmpty()) 
+      {
+          requestContextPath = "/";
+      }
+      setCookiePath(requestContextPath);
       setCookieMaxAge(-1);
       setCookieEnabled(true);
       clientUid = getCookieValue();
@@ -36,9 +41,10 @@
 
    public void seed()
    {
-      if (!isSet()) {
+      if (!isSet()) 
+      {
     	 clientUid = RandomStringUtils.random(50, true, true);
-         setCookieValueIfEnabled(clientUid);
+       setCookieValueIfEnabled(clientUid);
       }
    }
 



More information about the seam-commits mailing list