From do-not-reply at jboss.org Thu Oct 28 03:54:20 2010 Content-Type: multipart/mixed; boundary="===============5388996215397244037==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: gatein-commits at lists.jboss.org Subject: [gatein-commits] gatein SVN: r4866 - in portal/branches/branch-GTNPORTAL-1592: webui/portal/src/main/java/org/exoplatform/portal/webui/login and 1 other directory. Date: Thu, 28 Oct 2010 03:54:19 -0400 Message-ID: <201010280754.o9S7sJia027832@svn01.web.mwc.hst.phx2.redhat.com> --===============5388996215397244037== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: phuong_vu Date: 2010-10-28 03:54:19 -0400 (Thu, 28 Oct 2010) New Revision: 4866 Modified: portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy/= portal/webui/UILoginForm.gtmpl portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/exo= platform/portal/webui/login/UILoginForm.java Log: GTNPORTAL-1544 Always show Loading Progress bar when click Discard button o= n SignIn form Modified: portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/= groovy/portal/webui/UILoginForm.gtmpl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy= /portal/webui/UILoginForm.gtmpl 2010-10-28 07:06:34 UTC (rev 4865) +++ portal/branches/branch-GTNPORTAL-1592/web/portal/src/main/webapp/groovy= /portal/webui/UILoginForm.gtmpl 2010-10-28 07:54:19 UTC (rev 4866) @@ -22,22 +22,20 @@
- <% uiform.begin(); %> - +
" method=3D"post"= style=3D"margin: 0px;"> "/>
- + - + = - +
<%=3D_ctx.appRes("UILoginForm.label.Use= rName")%><% uiform.renderChild(0)%>
<%=3D_ctx.appRes("UILoginForm.label.pas= sword")%><% uiform.renderChild(1)%>
<% uiform.renderChild(2)%> <%=3D_ctx.appRes("UILoginForm.label.RememberOnComputer")%>
@@ -69,7 +67,7 @@
=
- <%uiform.end()%> = + =
@@ -84,7 +82,6 @@ Modified: portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/= org/exoplatform/portal/webui/login/UILoginForm.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/ex= oplatform/portal/webui/login/UILoginForm.java 2010-10-28 07:06:34 UTC (rev = 4865) +++ portal/branches/branch-GTNPORTAL-1592/webui/portal/src/main/java/org/ex= oplatform/portal/webui/login/UILoginForm.java 2010-10-28 07:54:19 UTC (rev = 4866) @@ -20,17 +20,13 @@ package org.exoplatform.portal.webui.login; = import org.exoplatform.portal.webui.workspace.UIMaskWorkspace; -import org.exoplatform.web.login.InitiateLoginServlet; +import org.exoplatform.webui.application.WebuiRequestContext; import org.exoplatform.webui.config.annotation.ComponentConfig; import org.exoplatform.webui.config.annotation.EventConfig; -import org.exoplatform.webui.core.lifecycle.UIFormLifecycle; +import org.exoplatform.webui.core.UIComponent; import org.exoplatform.webui.event.Event; import org.exoplatform.webui.event.EventListener; import org.exoplatform.webui.event.Event.Phase; -import org.exoplatform.webui.form.UIForm; -import org.exoplatform.webui.form.UIFormCheckBoxInput; -import org.exoplatform.webui.form.UIFormStringInput; -import org.exoplatform.webui.form.validator.MandatoryValidator; = /** * Created by The eXo Platform SARL @@ -38,26 +34,16 @@ * nhudinhthuan(a)exoplatform.com * Jul 11, 2006 = */ -(a)ComponentConfig(lifecycle =3D UIFormLifecycle.class, template =3D "syst= em:/groovy/portal/webui/UILoginForm.gtmpl", events =3D { +(a)ComponentConfig(template =3D "system:/groovy/portal/webui/UILoginForm.g= tmpl", events =3D { @EventConfig(phase =3D Phase.DECODE, listeners =3D UIMaskWorkspace.Clos= eActionListener.class), @EventConfig(phase =3D Phase.DECODE, listeners =3D UILoginForm.ForgetPa= sswordActionListener.class)}) -public class UILoginForm extends UIForm +public class UILoginForm extends UIComponent { - final static String USER_NAME =3D "username"; = - final static String PASSWORD =3D "password"; - public UILoginForm() throws Exception { - addUIFormInput(new UIFormStringInput(USER_NAME, USER_NAME, null).add= Validator(MandatoryValidator.class)) - .addUIFormInput( - new UIFormStringInput(PASSWORD, PASSWORD, null).setType(UIForm= StringInput.PASSWORD_TYPE).addValidator( - MandatoryValidator.class)); - addUIFormInput(new UIFormCheckBoxInput(InitiateLoginServlet.= COOKIE_NAME, - InitiateLoginServlet.COOKIE_NAME, Boolean.TRUE.toString())); } = - //TODO: dang.tung - forget password static public class ForgetPasswordActionListener extends EventListener<= UILoginForm> { public void execute(Event event) throws Exception @@ -68,4 +54,18 @@ event.getRequestContext().addUIComponentToUpdateByAjax(uiLogin); } } + + @Override + public void processDecode(WebuiRequestContext context) throws Exception + { + super.processDecode(context); + String action =3D context.getRequestParameter(context.getActionParam= eterName()); + Event event =3D createEvent(action, Event.Phase.DECODE,= context); + if (event !=3D null) + { + event.broadcast(); + } + } + = + = } --===============5388996215397244037==--