You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2008/10/07 17:08:42 UTC

svn commit: r702509 - /myfaces/tobago/branches/tobago-1.0.x/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/ScriptHandler.java

Author: bommel
Date: Tue Oct  7 08:08:41 2008
New Revision: 702509

URL: http://svn.apache.org/viewvc?rev=702509&view=rev
Log:
(TOBAGO-711) Onsubmit Attribute  is missing in facelets ScriptHandler

Modified:
    myfaces/tobago/branches/tobago-1.0.x/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/ScriptHandler.java

Modified: myfaces/tobago/branches/tobago-1.0.x/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/ScriptHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/ScriptHandler.java?rev=702509&r1=702508&r2=702509&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/ScriptHandler.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/extension/facelets/src/main/java/org/apache/myfaces/tobago/facelets/ScriptHandler.java Tue Oct  7 08:08:41 2008
@@ -31,6 +31,7 @@
 import java.util.Iterator;
 
 import org.apache.myfaces.tobago.component.UIPage;
+import org.apache.myfaces.tobago.component.ComponentUtil;
 
 /*
  * User: bommel
@@ -43,6 +44,7 @@
   private final TagAttribute onload;
   private final TagAttribute onunload;
   private final TagAttribute onexit;
+  private final TagAttribute onsubmit;
 
   public ScriptHandler(TagConfig config) {
     super(config);
@@ -50,6 +52,7 @@
     onload = getAttribute("onload");
     onunload = getAttribute("onunload");
     onexit = getAttribute("onexit");
+    onsubmit = getAttribute("onsubmit");
   }
 
   public void apply(FaceletContext faceletContext, UIComponent parent)
@@ -69,6 +72,9 @@
       if (onexit != null) {
         page.getOnexitScripts().add(onexit.getValue(faceletContext));
       }
+      if (onsubmit != null) {
+        page.getOnsubmitScripts().add(onsubmit.getValue(faceletContext));
+      }
       StringBuffer buffer = new StringBuffer();
       Iterator iter = findNextByType(TextHandler.class);
       while (iter.hasNext()) {