myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmarinsc...@apache.org
Subject svn commit: r378533 - in /myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax: HtmlOutputText.java HtmlOutputTextTag.java
Date Fri, 17 Feb 2006 14:45:46 GMT
Author: mmarinschek
Date: Fri Feb 17 06:45:44 2006
New Revision: 378533

URL: http://svn.apache.org/viewcvs?rev=378533&view=rev
Log:
Added patches from myfaces: 1133,1134,1135; thanks to Gerald Müllan

Added:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputText.java
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputTextTag.java

Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputText.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputText.java?rev=378533&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputText.java
(added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputText.java
Fri Feb 17 06:45:44 2006
@@ -0,0 +1,50 @@
+package org.apache.myfaces.custom.inputsuggestajax;
+
+
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+/**
+ * @author Gerald Müllan
+ *         Date: 15.02.2006
+ *         Time: 13:30:43
+ */
+public class HtmlOutputText extends javax.faces.component.html.HtmlOutputText
+{
+    public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlOutputTextFor";
+
+    private String _for;
+
+    public HtmlOutputText()
+    {
+    }
+
+     public Object saveState(FacesContext context)
+    {
+        Object values[] = new Object[2];
+        values[0] = super.saveState(context);
+        values[1] = _for;
+
+        return ((Object) (values));
+    }
+
+    public void restoreState(FacesContext context, Object state)
+    {
+        Object values[] = (Object[]) state;
+        super.restoreState(context, values[0]);
+        _for = (String) values[1];
+    }
+
+    public String getFor()
+    {
+         if (_for != null)
+            return _for;
+        ValueBinding vb = getValueBinding("for");
+        return vb != null ? vb.getValue(getFacesContext()).toString() : null;
+    }
+
+    public void setFor(String aFor)
+    {
+        _for = aFor;
+    }
+}

Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputTextTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputTextTag.java?rev=378533&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputTextTag.java
(added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/inputsuggestajax/HtmlOutputTextTag.java
Fri Feb 17 06:45:44 2006
@@ -0,0 +1,37 @@
+package org.apache.myfaces.custom.inputsuggestajax;
+
+import org.apache.myfaces.renderkit.JSFAttr;
+import javax.faces.component.UIComponent;
+
+/**
+ * @author Gerald Müllan
+ *         Date: 15.02.2006
+ *         Time: 13:40:43
+ */
+public class HtmlOutputTextTag extends org.apache.myfaces.taglib.html.HtmlOutputTextTag
+{
+    private String _for;
+
+    public String getComponentType() {
+        return HtmlOutputText.COMPONENT_TYPE;
+    }
+
+    public void release() {
+
+        super.release();
+
+        _for = null;
+    }
+
+    protected void setProperties(UIComponent component) {
+
+        super.setProperties(component);
+
+        setStringProperty(component, JSFAttr.FOR_ATTR, _for);
+    }
+
+    public void setFor(String aFor)
+    {
+        _for = aFor;
+    }
+}



Mime
View raw message