You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by id...@apache.org on 2010/08/30 12:46:38 UTC
svn commit: r990761 - in /myfaces/tobago/branches/tobago-1.0.x/theme:
scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/
standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/sc...
Author: idus
Date: Mon Aug 30 10:46:38 2010
New Revision: 990761
URL: http://svn.apache.org/viewvc?rev=990761&view=rev
Log:
TOBAGO-910: tc:upload hangs when entering invalid filename in IE 6
- prohibit entering text in file input via JS
- handle exception during cliend side submit by removing transitioning pane and display an alert
Modified:
myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java?rev=990761&r1=990760&r2=990761&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java Mon Aug 30 10:46:38 2010
@@ -133,6 +133,10 @@ public class FileRenderer extends InputR
writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
}
HtmlRendererUtil.renderTip(input, writer);
+ if (ClientProperties.getInstance(facesContext).getUserAgent().isMsie6()) {
+ writer.writeAttribute(HtmlAttributes.ONKEYDOWN, "this.blur();return false;", false);
+ writer.writeAttribute("oncontextmenu", "return false;", false);
+ }
writer.endElement(HtmlConstants.INPUT);
}
}
Modified: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=990761&r1=990760&r2=990761&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Mon Aug 30 10:46:38 2010
@@ -530,7 +530,13 @@ var Tobago = {
var onSubmitResult = Tobago.onSubmit();
if (onSubmitResult) {
// LOG.debug("submit form with action: " + Tobago.action.value);
- Tobago.form.submit();
+ try {
+ Tobago.form.submit();
+ } catch(e) {
+ Tobago.deleteOverlay(Tobago.page);
+ Tobago.isSubmit = false;
+ alert("Submit failed: " + e); // XXX localization, better error handling
+ }
}
Tobago.action.value = oldAction;
Tobago.form.target = oldTarget;