myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r832567 - /myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Date Tue, 03 Nov 2009 21:28:07 GMT
Author: lu4242
Date: Tue Nov  3 21:28:00 2009
New Revision: 832567

URL: http://svn.apache.org/viewvc?rev=832567&view=rev
Log:
MYFACES-2388 Link to download FILE on a Dialog fails of FF

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

Modified: myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java?rev=832567&r1=832566&r2=832567&view=diff
==============================================================================
--- myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
(original)
+++ myfaces/shared/trunk_3.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Tue Nov  3 21:28:00 2009
@@ -1013,6 +1013,11 @@
         context.append("{");
         context.append("var form = document.forms[formname];");
         context.prettyLine();
+        context.append("if (typeof form == 'undefined')");
+        context.append("{");
+        context.append("form = document.getElementById(formName);");
+        context.append("}");
+        context.prettyLine();
         context.append("if(typeof form.elements[name]!='undefined' && (form.elements[name].nodeName=='INPUT'
|| form.elements[name].nodeName=='input'))");
         context.append("{");
         context.append("form.elements[name].value=value;");        
@@ -1044,6 +1049,11 @@
         context.append("{");
         context.append("var form = document.forms[formname];");
         context.prettyLine();
+        context.append("if (typeof form == 'undefined')");
+        context.append("{");
+        context.append("form = document.getElementById(formName);");
+        context.append("}");
+        context.prettyLine();
         context.append("var hInput = form.elements[name];");
         context.prettyLine();
         context.append("if(typeof hInput !='undefined')");
@@ -1074,6 +1084,11 @@
 
         context.append("var form = document.forms[formName];");
         context.prettyLine();
+        context.append("if (typeof form == 'undefined')");
+        context.append("{");
+        context.append("form = document.getElementById(formName);");
+        context.append("}");
+        context.prettyLine();
         
         if (JavascriptUtils.isSaveFormSubmitLinkIE(FacesContext.getCurrentInstance().getExternalContext())){
             context.append("var agentString = navigator.userAgent.toLowerCase();");



Mime
View raw message