myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r513432 - /myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/ConverterTag.java
Date Thu, 01 Mar 2007 18:37:01 GMT
Author: mbr
Date: Thu Mar  1 10:37:00 2007
New Revision: 513432

URL: http://svn.apache.org/viewvc?view=rev&rev=513432
Log:
binder support added

Modified:
    myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/ConverterTag.java

Modified: myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/ConverterTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/ConverterTag.java?view=diff&rev=513432&r1=513431&r2=513432
==============================================================================
--- myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/ConverterTag.java (original)
+++ myfaces/core/branches/jsf12/api/src/main/java/javax/faces/webapp/ConverterTag.java Thu
Mar  1 10:37:00 2007
@@ -21,6 +21,7 @@
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.el.ValueBinding;
+import javax.faces.validator.Validator;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.Tag;
 import javax.servlet.jsp.tagext.TagSupport;
@@ -38,6 +39,7 @@
 {
     private static final long serialVersionUID = -6168345066829108081L;
     private String _converterId;
+    private String _binding;
 
     public ConverterTag()
     {
@@ -82,6 +84,7 @@
     {
         super.release();
         _converterId = null;
+        _binding = null;
     }
 
     protected Converter createConverter()
@@ -89,6 +92,17 @@
     {
         FacesContext facesContext = FacesContext.getCurrentInstance();
         Application application = facesContext.getApplication();
+
+        if(_binding != null) {
+            ValueBinding vb = application.createValueBinding(_binding);
+            if(vb != null) {
+                Converter converter = (Converter) vb.getValue(facesContext);
+                if(converter != null) {
+                    return converter;
+                }
+            }
+        }
+
         if (UIComponentTag.isValueReference(_converterId))
         {
             ValueBinding vb = facesContext.getApplication().createValueBinding(_converterId);
@@ -99,8 +113,8 @@
         
     }
 
-    public void setBinding(String binding)
+    public void setBinding(String binding) throws javax.servlet.jsp.JspException
     {
-        throw new UnsupportedOperationException("1.2");
+        _binding = binding;
     }
 }



Mime
View raw message