Revision: 402
          http://svn.sourceforge.net/stripes/?rev=402&view=rev
Author:   tfenne
Date:     2006-09-02 08:35:15 -0700 (Sat, 02 Sep 2006)

Log Message:
-----------
Merging r:400:401 from the trunk. Consists of a fix for STS-254

Modified Paths:
--------------
    branches/1.4.x/stripes/src/net/sourceforge/stripes/tag/InputTextAreaTag.java

Modified: 
branches/1.4.x/stripes/src/net/sourceforge/stripes/tag/InputTextAreaTag.java
===================================================================
--- 
branches/1.4.x/stripes/src/net/sourceforge/stripes/tag/InputTextAreaTag.java    
    2006-09-02 15:33:27 UTC (rev 401)
+++ 
branches/1.4.x/stripes/src/net/sourceforge/stripes/tag/InputTextAreaTag.java    
    2006-09-02 15:35:15 UTC (rev 402)
@@ -87,12 +87,20 @@
     public int doEndInputTag() throws JspException {
         try {
             // Find out if we have a value from the PopulationStrategy
-            Object value   = getSingleOverrideValue();
+            Object value = getSingleOverrideValue();
 
             writeOpenTag(getPageContext().getOut(), "textarea");
 
             // Write out the contents of the text area
             if (value != null) {
+                // Most browsers have this annoying habit of eating the first 
newline
+                // in a textarea tag. Since this is probably not desired, 
sometimes
+                // we need to add an extra newline into the output before the 
value
+                String body = getBodyContentAsString();
+                if (body == null || !body.equals(value)) {
+                    getPageContext().getOut().write('\n');
+                }
+
                 getPageContext().getOut().write( 
HtmlUtil.encode(format(value)) );
             }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to