empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r701553 - /incubator/empire-db/trunk/struts2-ext/Empire-struts2-ext/src/org/apache/empire/struts2/jsp/controls/TextAreaInputControl.java
Date Fri, 03 Oct 2008 22:33:26 GMT
Author: doebele
Date: Fri Oct  3 15:33:26 2008
New Revision: 701553

URL: http://svn.apache.org/viewvc?rev=701553&view=rev
Log:
EMPIREDB-24

Modified:
    incubator/empire-db/trunk/struts2-ext/Empire-struts2-ext/src/org/apache/empire/struts2/jsp/controls/TextAreaInputControl.java

Modified: incubator/empire-db/trunk/struts2-ext/Empire-struts2-ext/src/org/apache/empire/struts2/jsp/controls/TextAreaInputControl.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/trunk/struts2-ext/Empire-struts2-ext/src/org/apache/empire/struts2/jsp/controls/TextAreaInputControl.java?rev=701553&r1=701552&r2=701553&view=diff
==============================================================================
--- incubator/empire-db/trunk/struts2-ext/Empire-struts2-ext/src/org/apache/empire/struts2/jsp/controls/TextAreaInputControl.java
(original)
+++ incubator/empire-db/trunk/struts2-ext/Empire-struts2-ext/src/org/apache/empire/struts2/jsp/controls/TextAreaInputControl.java
Fri Oct  3 15:33:26 2008
@@ -101,8 +101,6 @@
     @Override
     public void renderInput(HtmlWriter writer, ControlInfo ci)
     {
-        // <textarea rows="35" name="richtext" cols="120">
-
         HtmlTag input = writer.startTag("textarea");
         input.addAttribute("id",    ci.getId());
         input.addAttribute("class", ci.getCssClass());
@@ -114,10 +112,10 @@
         // maxlength
         if (ci.getDisabled()==false)
         {   // Get Max Length
-            int maxLength = (int)ci.getColumn().getSize();
             String checklength = getFormatOption(ci, "maxlength:");
-            if (StringUtils.isValid(checklength) && maxLength>0)
+            if (StringUtils.isValid(checklength))
             {   // Do lengthcheck via onKeyPress and onKeyUp Events
+                int maxLength = (int)ci.getColumn().getSize();
                 checklength = StringUtils.replace(checklength, "{0}", String.valueOf(maxLength));

                 input.addAttribute("onkeypress", checklength);
                 input.addAttribute("onkeyup",    checklength);



Mime
View raw message