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/02/17 18:30:26 UTC

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

Author: werpu
Date: Fri Feb 17 09:30:23 2006
New Revision: 378576

URL: http://svn.apache.org/viewcvs?rev=378576&view=rev
Log:
added a helper convenience method

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

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java?rev=378576&r1=378575&r2=378576&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/dojo/DojoUtils.java Fri Feb 17 09:30:23 2006
@@ -113,7 +113,6 @@
                     if(!configPropertyField.getName().startsWith("getClass") && configPropertyField.getName().startsWith("get") || configPropertyField.getName().startsWith("is"))
                         methodCore = (configPropertyField.getName().startsWith("get")) ? configPropertyField.getName().substring(3) : configPropertyField.getName().substring(2);
 
-
                     if (methodCore != null) {
                         Object val = configPropertyField.invoke(config,null);
                         if(val != null) {
@@ -355,6 +354,21 @@
     public static String createDebugStatement(String stmnt)
     {
         return "dojo.debug(\"" + stmnt + "\");\n";
+    }
+    
+    /**
+     * helper to write out debug statements
+     * this is only a convenience method to reduce the
+     * code bloat
+     * 
+     * @param writer
+     * @param stmnt
+     * @return
+     * @throws IOException
+     */
+    public static void writeDebugStatement(ResponseWriter writer, String stmnt) throws IOException {
+        stmnt = createDebugStatement(stmnt);
+        writer.write(stmnt);
     }
 
 }