struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From musa...@apache.org
Subject svn commit: r727804 - in /struts/sandbox/trunk/struts2-javatemplates-plugin/src: main/java/org/apache/struts2/views/java/simple/FieldErrorHandler.java test/java/org/apache/struts2/views/java/simple/FieldErrorTest.java
Date Thu, 18 Dec 2008 19:56:27 GMT
Author: musachy
Date: Thu Dec 18 11:56:27 2008
New Revision: 727804

URL: http://svn.apache.org/viewvc?rev=727804&view=rev
Log:
Get error field names from parameters

Modified:
    struts/sandbox/trunk/struts2-javatemplates-plugin/src/main/java/org/apache/struts2/views/java/simple/FieldErrorHandler.java
    struts/sandbox/trunk/struts2-javatemplates-plugin/src/test/java/org/apache/struts2/views/java/simple/FieldErrorTest.java

Modified: struts/sandbox/trunk/struts2-javatemplates-plugin/src/main/java/org/apache/struts2/views/java/simple/FieldErrorHandler.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-javatemplates-plugin/src/main/java/org/apache/struts2/views/java/simple/FieldErrorHandler.java?rev=727804&r1=727803&r2=727804&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-javatemplates-plugin/src/main/java/org/apache/struts2/views/java/simple/FieldErrorHandler.java
(original)
+++ struts/sandbox/trunk/struts2-javatemplates-plugin/src/main/java/org/apache/struts2/views/java/simple/FieldErrorHandler.java
Thu Dec 18 11:56:27 2008
@@ -32,7 +32,7 @@
     public void generate() throws IOException {
         Map<String, Object> params = context.getParameters();
         Map<String, List<String>> errors = (Map<String, List<String>>)
findValue("fieldErrors");
-        List<String> fieldErrorFieldNames = (List<String>) findValue("fieldErrorFieldNames");
+        List<String> fieldErrorFieldNames = (List<String>) params.get("errorFieldNames");
 
         if (fieldErrorFieldNames != null && !fieldErrorFieldNames.isEmpty()) {
             //wrapping ul

Modified: struts/sandbox/trunk/struts2-javatemplates-plugin/src/test/java/org/apache/struts2/views/java/simple/FieldErrorTest.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-javatemplates-plugin/src/test/java/org/apache/struts2/views/java/simple/FieldErrorTest.java?rev=727804&r1=727803&r2=727804&view=diff
==============================================================================
--- struts/sandbox/trunk/struts2-javatemplates-plugin/src/test/java/org/apache/struts2/views/java/simple/FieldErrorTest.java
(original)
+++ struts/sandbox/trunk/struts2-javatemplates-plugin/src/test/java/org/apache/struts2/views/java/simple/FieldErrorTest.java
Thu Dec 18 11:56:27 2008
@@ -70,8 +70,7 @@
     }
 
     public void testRenderFieldErrorWithoutOneFieldName() {
-        this.fieldNames.remove(1);
-
+        tag.setFieldName("field1");
         tag.evaluateParams();
         map.putAll(tag.getParameters());
         theme.renderTag(getTagName(), context);



Mime
View raw message