You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/11/03 20:32:08 UTC

svn commit: r470962 - /myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java

Author: werpu
Date: Fri Nov  3 11:32:07 2006
New Revision: 470962

URL: http://svn.apache.org/viewvc?view=rev&rev=470962
Log:
added another convenience method for simplified requires handling

Modified:
    myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java

Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java?view=diff&rev=470962&r1=470961&r2=470962
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java Fri Nov  3 11:32:07 2006
@@ -282,6 +282,18 @@
     }
 
     /**
+     * convenience method for easier requires handling
+     * @param facesContext standard faces context
+     * @param component the component
+     * @param requires an array of requires which is rendered into single dojo.require statements
+     * @throws IOException
+     */
+    public static void addRequire(FacesContext facesContext, UIComponent component, String [] requires) throws IOException {
+        for(int cnt = 0; cnt < requires.length; cnt ++)
+            addRequire(facesContext, component, requires[cnt]);
+    }    
+    
+    /**
      * adds a dojo require include to our mix of stuff used
      * 
      * @param facesContext