Author: thomas.heute(a)jboss.com
Date: 2010-11-01 09:32:30 -0400 (Mon, 01 Nov 2010)
New Revision: 4889
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/RegisterPortletApplicationController.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/CaptchaValidator.java
Log:
GTNPORTAL-1615: Captcha is not refreshing on Register page
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/RegisterPortletApplicationController.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/RegisterPortletApplicationController.java 2010-11-01
11:05:57 UTC (rev 4888)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/RegisterPortletApplicationController.java 2010-11-01
13:32:30 UTC (rev 4889)
@@ -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:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/CaptchaValidator.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/CaptchaValidator.java 2010-11-01
11:05:57 UTC (rev 4888)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/CaptchaValidator.java 2010-11-01
13:32:30 UTC (rev 4889)
@@ -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())))
{
Show replies by date