myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r633078 - /myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
Date Mon, 03 Mar 2008 13:46:31 GMT
Author: lu4242
Date: Mon Mar  3 05:46:28 2008
New Revision: 633078

URL: http://svn.apache.org/viewvc?rev=633078&view=rev
Log:
fixes MYFACES-1504  oamSetHiddenInput function missing if ...

Modified:
    myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java

Modified: myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java?rev=633078&r1=633077&r2=633078&view=diff
==============================================================================
--- myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
(original)
+++ myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlButtonRendererBase.java
Mon Mar  3 05:46:28 2008
@@ -79,6 +79,17 @@
 
         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);
+            }
+        }
+        
         HtmlRendererUtils.renderFormSubmitScript(facesContext);
 
         writer.startElement(HTML.INPUT_ELEM, uiComponent);



Mime
View raw message