You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by jm...@apache.org on 2006/04/13 17:31:38 UTC
svn commit: r393833 - in /struts/action/trunk/faces: ./ core-library/
core-library/src/ src/
systest1-webapp/src/java/org/apache/struts/faces/systest1/
Author: jmitchell
Date: Thu Apr 13 08:31:04 2006
New Revision: 393833
URL: http://svn.apache.org/viewcvs?rev=393833&view=rev
Log:
Fixing Faces library and sample apps (Part 1)
* moving src back under core-library
* moving pom.xml back under core-library, the pom at the root of faces should be similar to the one at the root of apps, which simply delegates to it's children (modules)
* change ActionError usage to ActionMessage
Added:
struts/action/trunk/faces/core-library/pom.xml
- copied unchanged from r393817, struts/action/trunk/faces/pom.xml
struts/action/trunk/faces/core-library/src/
- copied from r393785, struts/action/trunk/faces/src/
Removed:
struts/action/trunk/faces/pom.xml
struts/action/trunk/faces/src/
Modified:
struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/ContextAction.java
struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/LogonAction.java
Modified: struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/ContextAction.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/ContextAction.java?rev=393833&r1=393832&r2=393833&view=diff
==============================================================================
--- struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/ContextAction.java (original)
+++ struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/ContextAction.java Thu Apr 13 08:31:04 2006
@@ -29,7 +29,6 @@
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
Modified: struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/LogonAction.java
URL: http://svn.apache.org/viewcvs/struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/LogonAction.java?rev=393833&r1=393832&r2=393833&view=diff
==============================================================================
--- struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/LogonAction.java (original)
+++ struts/action/trunk/faces/systest1-webapp/src/java/org/apache/struts/faces/systest1/LogonAction.java Thu Apr 13 08:31:04 2006
@@ -29,8 +29,9 @@
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
/**
@@ -60,21 +61,21 @@
PropertyUtils.getSimpleProperty(form, "username");
if ((username == null) || ("".equals(username))) {
errors.add("username",
- new ActionError("logon.username"));
+ new ActionMessage("logon.username"));
}
String password = (String)
PropertyUtils.getSimpleProperty(form, "password");
if ((password == null) || ("".equals(password))) {
errors.add("password",
- new ActionError("logon.password"));
+ new ActionMessage("logon.password"));
}
if (log.isTraceEnabled()) {
log.trace("username=" + username + ",password=" + password);
}
if (errors.isEmpty() &&
(!"gooduser".equals(username) || !"goodpass".equals(password))) {
- errors.add(ActionErrors.GLOBAL_ERROR,
- new ActionError("logon.mismatch"));
+ errors.add(ActionMessages.GLOBAL_MESSAGE,
+ new ActionMessage("logon.mismatch"));
}
if (errors.isEmpty()) {
if (log.isDebugEnabled()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org