[seam-commits] Seam SVN: r15180 - branches/community/Seam_2_3/jboss-seam-ui/src/main/java/org/jboss/seam/ui.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Oct 2 08:52:19 EDT 2012


Author: manaRH
Date: 2012-10-02 08:52:19 -0400 (Tue, 02 Oct 2012)
New Revision: 15180

Modified:
   branches/community/Seam_2_3/jboss-seam-ui/src/main/java/org/jboss/seam/ui/ClientUidSelector.java
Log:
JBSEAM-4701 - added forgotten lines

Modified: branches/community/Seam_2_3/jboss-seam-ui/src/main/java/org/jboss/seam/ui/ClientUidSelector.java
===================================================================
--- branches/community/Seam_2_3/jboss-seam-ui/src/main/java/org/jboss/seam/ui/ClientUidSelector.java	2012-10-02 12:52:08 UTC (rev 15179)
+++ branches/community/Seam_2_3/jboss-seam-ui/src/main/java/org/jboss/seam/ui/ClientUidSelector.java	2012-10-02 12:52:19 UTC (rev 15180)
@@ -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