You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/05/29 14:37:21 UTC

svn commit: r1343700 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java

Author: lofwyr
Date: Tue May 29 12:37:21 2012
New Revision: 1343700

URL: http://svn.apache.org/viewvc?rev=1343700&view=rev
Log:
TOBAGO-1076: Move the generated javascripts for the components to the end of the html document 
 - hotfix: getting defaultCommand running

Modified:
    myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java?rev=1343700&r1=1343699&r2=1343700&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java Tue May 29 12:37:21 2012
@@ -112,7 +112,12 @@ public class ButtonRenderer extends Comm
       HtmlRendererUtils.setDefaultTransition(facesContext, transition);
 
       HtmlRendererUtils.writeScriptLoader(facesContext, null, new String[]{
-          "Tobago.setDefaultAction('" + button.getClientId(facesContext) + "')"});      
+          "Tobago.registerListener(\n"
+              + "function() { \n"
+              + "Tobago.setDefaultAction('" + button.getClientId(facesContext) + "') \n"
+              + "}, \n"
+              + "Tobago.Phase.DOCUMENT_READY);"
+              });
     }
   }