myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r813595 - /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
Date Thu, 10 Sep 2009 21:25:29 GMT
Author: bommel
Date: Thu Sep 10 21:25:28 2009
New Revision: 813595

URL: http://svn.apache.org/viewvc?rev=813595&view=rev
Log:
(TOBAGO-788) Error using paging (tc:sheet) in IE

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

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java?rev=813595&r1=813594&r2=813595&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
(original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
Thu Sep 10 21:25:28 2009
@@ -480,6 +480,16 @@
     viewHandler.writeState(facesContext);
     writer.endElement(HtmlConstants.SPAN);
 
+    // avoid submit page in ie if the form contains only one input and you press the enter
key in the input
+    if (ClientProperties.getInstance(facesContext.getViewRoot()).getUserAgent().isMsie())
{
+      writer.startElement(HtmlConstants.INPUT, null);
+      writer.writeAttribute(HtmlAttributes.TYPE, "text", false);
+      writer.writeAttribute(HtmlAttributes.NAME, "tobago.dummy", false);
+      writer.writeAttribute(HtmlAttributes.TABINDEX, "-1", false);
+      writer.writeAttribute(HtmlAttributes.STYLE, "visibility:hidden;display:none;", false);
+      writer.endElement(HtmlConstants.INPUT);
+    }
+
     writer.endElement(HtmlConstants.FORM);
 
     // debugging...



Mime
View raw message