You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2005/12/29 23:24:18 UTC

svn commit: r359911 - in /myfaces/tomahawk/trunk: src/java/org/apache/myfaces/component/html/ext/HtmlInputTextarea.java src/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextareaTag.java tld/tomahawk.tld

Author: matzew
Date: Thu Dec 29 14:24:09 2005
New Revision: 359911

URL: http://svn.apache.org/viewcvs?rev=359911&view=rev
Log:
adding wrap attribute to t:inputTextarea

Modified:
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlInputTextarea.java
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextareaTag.java
    myfaces/tomahawk/trunk/tld/tomahawk.tld

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlInputTextarea.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlInputTextarea.java?rev=359911&r1=359910&r2=359911&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlInputTextarea.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/component/html/ext/HtmlInputTextarea.java Thu Dec 29 14:24:09 2005
@@ -15,15 +15,15 @@
  */
 package org.apache.myfaces.component.html.ext;
 
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
 import org.apache.myfaces.component.DisplayValueOnlyCapable;
 import org.apache.myfaces.component.UserRoleAware;
 import org.apache.myfaces.component.UserRoleUtils;
 import org.apache.myfaces.component.html.util.HtmlComponentUtils;
 import org.apache.myfaces.util._ComponentUtils;
 
-import javax.faces.context.FacesContext;
-import javax.faces.el.ValueBinding;
-
 /**
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
@@ -54,6 +54,7 @@
     private Boolean _displayValueOnly = null;
 	private String _displayValueOnlyStyle = null;
 	private String _displayValueOnlyStyleClass = null;
+	private String _wrap = null;
 
     public HtmlInputTextarea()
     {
@@ -152,5 +153,14 @@
     public void setDisplayValueOnlyStyleClass(String displayValueOnlyStyleClass) {
         _displayValueOnlyStyleClass = displayValueOnlyStyleClass;
     }
-}
 
+
+	public String getWrap() {
+		return _wrap;
+	}
+
+
+	public void setWrap(String wrap) {
+		_wrap = wrap;
+	}
+}
\ No newline at end of file

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextareaTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextareaTag.java?rev=359911&r1=359910&r2=359911&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextareaTag.java (original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/taglib/html/ext/HtmlInputTextareaTag.java Thu Dec 29 14:24:09 2005
@@ -15,13 +15,14 @@
  */
 package org.apache.myfaces.taglib.html.ext;
 
+import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.component.DisplayValueOnlyCapable;
 import org.apache.myfaces.component.UserRoleAware;
 import org.apache.myfaces.component.html.ext.HtmlInputTextarea;
+import org.apache.myfaces.renderkit.html.HTML;
 import org.apache.myfaces.taglib.html.HtmlInputTextareaTagBase;
 
-import javax.faces.component.UIComponent;
-
 /**
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
@@ -29,14 +30,16 @@
 public class HtmlInputTextareaTag
         extends HtmlInputTextareaTagBase
 {
-    public String getComponentType()
+    private static final String TEXTAREA_RENDERER = "org.apache.myfaces.Textarea";
+
+	public String getComponentType()
     {
         return HtmlInputTextarea.COMPONENT_TYPE;
     }
 
     public String getRendererType()
     {
-        return "org.apache.myfaces.Textarea";
+        return TEXTAREA_RENDERER;
     }
 
     private String _enabledOnUserRole;
@@ -46,6 +49,8 @@
 	private String _displayValueOnlyStyle;
 	private String _displayValueOnlyStyleClass;
 
+    private String _wrap;
+	
     public void release() {
         super.release();
 
@@ -55,6 +60,8 @@
         _displayValueOnly=null;
         _displayValueOnlyStyle=null;
         _displayValueOnlyStyleClass=null;
+        
+        _wrap = null;
     }
 
     protected void setProperties(UIComponent component)
@@ -66,6 +73,9 @@
         setBooleanProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_ATTR, _displayValueOnly);
         setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_ATTR, _displayValueOnlyStyle);
         setStringProperty(component, DisplayValueOnlyCapable.DISPLAY_VALUE_ONLY_STYLE_CLASS_ATTR, _displayValueOnlyStyleClass);
+        
+        setStringProperty(component, HTML.WRAP_ATTR, _wrap);
+        
     }
 
     public void setEnabledOnUserRole(String enabledOnUserRole)
@@ -92,4 +102,8 @@
     {
         _displayValueOnlyStyleClass = displayValueOnlyStyleClass;
     }
-}
+    public void setWrap(String wrap)
+    {
+        _wrap = wrap;
+    }
+}
\ No newline at end of file

Modified: myfaces/tomahawk/trunk/tld/tomahawk.tld
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/tld/tomahawk.tld?rev=359911&r1=359910&r2=359911&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/tld/tomahawk.tld (original)
+++ myfaces/tomahawk/trunk/tld/tomahawk.tld Thu Dec 29 14:24:09 2005
@@ -21,6 +21,7 @@
   "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd" [
 <!ENTITY display_value_only_attributes  SYSTEM "entities/display_value_only_attributes.xml">
 <!ENTITY ext_forceId_attribute          SYSTEM "entities/ext_forceId_attribute.xml">
+<!ENTITY ext_textarea_attribute         SYSTEM "entities/ext_textarea_attribute.xml">
 <!ENTITY ext_actionfor_attribute        SYSTEM "entities/ext_actionfor_attribute.xml">
 <!ENTITY ext_escape_attribute           SYSTEM "entities/ext_escape_attribute.xml">
 <!ENTITY faces_binding_attribute        SYSTEM "entities/faces_binding_attribute.xml">
@@ -350,6 +351,7 @@
         &standard_input_textarea_attributes;
         &user_role_attributes;
         &ext_forceId_attribute;
+        &ext_textarea_attribute;
         &display_value_only_attributes;
     </tag>