You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2009/07/11 04:33:19 UTC

svn commit: r793166 - /myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java

Author: lu4242
Date: Sat Jul 11 02:33:19 2009
New Revision: 793166

URL: http://svn.apache.org/viewvc?rev=793166&view=rev
Log:
remove abstract to allow myfaces-test compile

Modified:
    myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java

Modified: myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java?rev=793166&r1=793165&r2=793166&view=diff
==============================================================================
--- myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java (original)
+++ myfaces/core/trunk/api/src/main/java/javax/faces/application/Application.java Sat Jul 11 02:33:19 2009
@@ -128,7 +128,15 @@
      * 
      * FIXME: Notify EG, this should not be abstract and throw UnsupportedOperationException
      */
-    public abstract void addBehavior(String behaviorId, String behaviorClass);
+    public void addBehavior(String behaviorId, String behaviorClass)
+    {
+        Application application = getMyfacesApplicationInstance();
+        if (application != null)
+        {
+            application.addBehavior(behaviorId, behaviorClass);
+        }
+        throw new UnsupportedOperationException();
+    }
 
     /**
      * Define a new mapping from a logical "component type" to an actual java class name. This controls what type is
@@ -275,7 +283,15 @@
      * 
      * FIXME: Notify EG, this should not be abstract and throw UnsupportedOperationException
      */
-    public abstract Behavior createBehavior(String behaviorId) throws FacesException;
+    public Behavior createBehavior(String behaviorId) throws FacesException
+    {
+        Application application = getMyfacesApplicationInstance();
+        if (application != null)
+        {
+            return application.createBehavior(behaviorId);
+        }
+        throw new UnsupportedOperationException();
+    }
 
     /**
      * ???