[gatein-commits] gatein SVN: r4978 - in epp/portal/branches/EPP_5_1_Branch: webui/portal/src/main/java/org/exoplatform/portal/webui and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue Nov 9 03:42:26 EST 2010


Author: thomas.heute at jboss.com
Date: 2010-11-09 03:42:24 -0500 (Tue, 09 Nov 2010)
New Revision: 4978

Modified:
   epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/RegisterPortletApplicationController.java
   epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/CaptchaValidator.java
Log:
JBEPP-593: Captcha is not refreshing on Register page


Modified: epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/RegisterPortletApplicationController.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/RegisterPortletApplicationController.java	2010-11-09 08:38:37 UTC (rev 4977)
+++ epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/RegisterPortletApplicationController.java	2010-11-09 08:42:24 UTC (rev 4978)
@@ -67,18 +67,18 @@
    {
       PortletSession session = req.getPortletSession();
       Captcha captcha;
-      if (session.getAttribute(NAME) == null)
+      if (session.getAttribute(NAME, PortletSession.APPLICATION_SCOPE) == null)
       {
          captcha = new Captcha.Builder(_width, _height).addText().gimp().addNoise().addBackground().build();
 
 
-         session.setAttribute(NAME, captcha);
+         session.setAttribute(NAME, captcha, PortletSession.APPLICATION_SCOPE);
          writeImage(resp, captcha.getImage());
 
          return;
       }
 
-      captcha = (Captcha)session.getAttribute(NAME);
+      captcha = (Captcha)session.getAttribute(NAME, PortletSession.APPLICATION_SCOPE);
       writeImage(resp, captcha.getImage());
 
    }

Modified: epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/CaptchaValidator.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/CaptchaValidator.java	2010-11-09 08:38:37 UTC (rev 4977)
+++ epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/CaptchaValidator.java	2010-11-09 08:42:24 UTC (rev 4978)
@@ -49,7 +49,7 @@
       PortletRequest req = ctx.getRequest();
       PortletSession session = req.getPortletSession();
 
-      Captcha captcha = (Captcha) session.getAttribute(Captcha.NAME);
+      Captcha captcha = (Captcha) session.getAttribute(Captcha.NAME, PortletSession.APPLICATION_SCOPE);
 
       if ((captcha != null) && (captcha.isCorrect((String) uiInput.getValue())))
       {



More information about the gatein-commits mailing list