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 2009/09/10 23:25:29 UTC

svn commit: r813595 - /myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java

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...