myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r799989 - in /myfaces/core/trunk: api/src/main/java/javax/faces/view/facelets/ impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/
Date Sun, 02 Aug 2009 04:49:05 GMT
Author: lu4242
Date: Sun Aug  2 04:49:05 2009
New Revision: 799989

URL: http://svn.apache.org/viewvc?rev=799989&view=rev
Log:
MYFACES-2299 Add AttachedObjectHandler implementation when it is necessary

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/view/facelets/FaceletsAttachedObjectHandler.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/view/facelets/FaceletsAttachedObjectHandler.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/view/facelets/FaceletsAttachedObjectHandler.java?rev=799989&r1=799988&r2=799989&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/view/facelets/FaceletsAttachedObjectHandler.java
(original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/view/facelets/FaceletsAttachedObjectHandler.java
Sun Aug  2 04:49:05 2009
@@ -44,17 +44,20 @@
     @Override
     public final void applyAttachedObject(FacesContext context, UIComponent parent)
     {
-        // TODO: IMPLEMENT HERE
+        //Just redirect to delegate handler
+        getAttachedObjectHandlerHelper().applyAttachedObject(context, parent);
     }
     
     /**
+     * Return the delegate handler for this instance. Note that this suppose
+     * delegate tag handlers wrapping this class should implement AttachedObjectHandler
+     * interface.
      * 
      * @return
      */
     protected final AttachedObjectHandler getAttachedObjectHandlerHelper()
     {
-        // TODO: IMPLEMENT HERE
-        return null;
+        return (AttachedObjectHandler) getTagHandlerDelegate();
     }
 
     /**
@@ -63,7 +66,7 @@
     @Override
     public final String getFor()
     {
-        // TODO: IMPLEMENT HERE
-        return null;
+        //Just redirect to delegate handler
+        return getAttachedObjectHandlerHelper().getFor();
     }
 }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java?rev=799989&r1=799988&r2=799989&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/BehaviorTagHandlerDelegate.java
Sun Aug  2 04:49:05 2009
@@ -21,6 +21,8 @@
 import java.io.IOException;
 
 import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.view.AttachedObjectHandler;
 import javax.faces.view.facelets.BehaviorHandler;
 import javax.faces.view.facelets.FaceletContext;
 import javax.faces.view.facelets.MetaRuleset;
@@ -32,7 +34,7 @@
  *
  * @since 2.0
  */
-public class BehaviorTagHandlerDelegate extends TagHandlerDelegate
+public class BehaviorTagHandlerDelegate extends TagHandlerDelegate implements AttachedObjectHandler
 {
 
     private BehaviorHandler _delegate;
@@ -56,4 +58,18 @@
         return null;
     }
 
+    @Override
+    public void applyAttachedObject(FacesContext context, UIComponent parent)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public String getFor()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java?rev=799989&r1=799988&r2=799989&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ConverterTagHandlerDelegate.java
Sun Aug  2 04:49:05 2009
@@ -25,6 +25,7 @@
 import javax.faces.component.ValueHolder;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
+import javax.faces.view.AttachedObjectHandler;
 import javax.faces.view.facelets.ConverterHandler;
 import javax.faces.view.facelets.FaceletContext;
 import javax.faces.view.facelets.MetaRuleset;
@@ -45,7 +46,7 @@
  *
  * @since 2.0
  */
-public class ConverterTagHandlerDelegate extends TagHandlerDelegate
+public class ConverterTagHandlerDelegate extends TagHandlerDelegate implements AttachedObjectHandler
 {
     private ConverterHandler _delegate;
     
@@ -152,4 +153,18 @@
     {
         return new MetaRulesetImpl(_delegate.getTag(), type).ignore("binding");
     }
+
+    @Override
+    public void applyAttachedObject(FacesContext context, UIComponent parent)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public String getFor()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
 }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java?rev=799989&r1=799988&r2=799989&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ValidatorTagHandlerDelegate.java
Sun Aug  2 04:49:05 2009
@@ -23,7 +23,9 @@
 import javax.el.ValueExpression;
 import javax.faces.component.EditableValueHolder;
 import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
 import javax.faces.validator.Validator;
+import javax.faces.view.AttachedObjectHandler;
 import javax.faces.view.facelets.FaceletContext;
 import javax.faces.view.facelets.MetaRuleset;
 import javax.faces.view.facelets.TagAttribute;
@@ -44,7 +46,7 @@
  *
  * @since 2.0
  */
-public class ValidatorTagHandlerDelegate extends TagHandlerDelegate
+public class ValidatorTagHandlerDelegate extends TagHandlerDelegate implements AttachedObjectHandler
 {
     private ValidatorHandler _delegate;
     
@@ -131,4 +133,18 @@
         return new MetaRulesetImpl(_delegate.getTag(), type).ignore("binding");
     }
 
+    @Override
+    public void applyAttachedObject(FacesContext context, UIComponent parent)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public String getFor()
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
 }



Mime
View raw message