webwork/src/main/webwork/view/taglib PropertyTag.java,1.10,1.11

[email protected] Sat, 29 Jun 2002 18:34:43 -0700
Newsgroups gmane.comp.java.webwork.cvs
Message-ID <[email protected]>
Update of /cvsroot/webwork/webwork/src/main/webwork/view/taglib
In directory usw-pr-cvs1:/tmp/cvs-serv17405a

Modified Files:
	PropertyTag.java 
Log Message:
added support for classes that have editors with getAsText()

Index: PropertyTag.java
===================================================================
RCS file: /cvsroot/webwork/webwork/src/main/webwork/view/taglib/PropertyTag.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- PropertyTag.java	30 May 2002 22:57:47 -0000	1.10
+++ PropertyTag.java	30 Jun 2002 01:34:41 -0000	1.11
@@ -7,6 +7,7 @@
 package webwork.view.taglib;
 
 import webwork.util.TextUtil;
+import webwork.util.BeanUtil;
 
 import javax.servlet.ServletException;
 import javax.servlet.jsp.JspException;
@@ -108,9 +109,9 @@
                   Iterator enum = (Iterator) value;
                   if (enum.hasNext()) {
                      if (escape.booleanValue()) {
-                        pageContext.getOut().write(TextUtil.escapeHTML(enum.next().toString()));
+                        pageContext.getOut().write(TextUtil.escapeHTML(BeanUtil.toStringValue(enum.next())));
                      } else {
-                        pageContext.getOut().write(enum.next().toString());
+                        pageContext.getOut().write(BeanUtil.toStringValue(enum.next()));
                      }
                   }
                } else if (value instanceof char[]) {
@@ -121,9 +122,9 @@
                   }
                } else {
                   if (escape.booleanValue()) {
-                     pageContext.getOut().write(TextUtil.escapeHTML(value.toString()));
+                     pageContext.getOut().write(TextUtil.escapeHTML(BeanUtil.toStringValue(value)));
                   } else {
-                     pageContext.getOut().write(value.toString());
+                     pageContext.getOut().write(BeanUtil.toStringValue(value));
                   }
                }
             else




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
No, I will not fix your computer.
http://thinkgeek.com/sf