myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r633077 - /myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
Date Mon, 03 Mar 2008 13:31:52 GMT
Author: lu4242
Date: Mon Mar  3 05:31:48 2008
New Revision: 633077

URL: http://svn.apache.org/viewvc?rev=633077&view=rev
Log:
fixes MYFACES-1830 oamSetHiddenInput function missing for myfaces core 1.2 if ...

Modified:
    myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java?rev=633077&r1=633076&r2=633077&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
(original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
Mon Mar  3 05:31:48 2008
@@ -82,6 +82,17 @@
         String clientId = uiComponent.getClientId(facesContext);
 
         ResponseWriter writer = facesContext.getResponseWriter();
+        
+        // If we have javascript enabled, and autoscroll is enabled, 
+        // we should write the form submit script
+        // (define oamSetHiddenInput, oamClearHiddenInput, oamSubmitForm)
+        // because oamSetHiddenInput is called on onclick function
+        if (JavascriptUtils.isJavascriptAllowed(facesContext.getExternalContext()))
+        {        
+            if (MyfacesConfig.getCurrentInstance(facesContext.getExternalContext()).isAutoScroll())
{
+                HtmlRendererUtils.renderFormSubmitScript(facesContext);
+            }
+        }
 
         writer.startElement(HTML.INPUT_ELEM, uiComponent);
 



Mime
View raw message