You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/10/19 02:53:36 UTC
[5/8] git commit: Nest hidden input fields for a form directly inside
the form element (remove the intervening div element)
Nest hidden input fields for a form directly inside the form element (remove the intervening div element)
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b37ffbff
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b37ffbff
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b37ffbff
Branch: refs/heads/5.4-js-rewrite
Commit: b37ffbff417df9b35b942a8abc66625941a639b6
Parents: 47a324e
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Thu Oct 18 15:32:25 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Thu Oct 18 15:36:18 2012 -0700
----------------------------------------------------------------------
.../apache/tapestry5/corelib/components/Form.java | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b37ffbff/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java
index b3bbd93..4be3dcf 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Form.java
@@ -418,14 +418,19 @@ public class Form implements ClientElement, FormValidationControl
String encodingType = formSupport.getEncodingType();
if (encodingType != null)
+ {
form.forceAttributes("enctype", encodingType);
+ }
writer.end(); // form
div.element("input", "type", "hidden", "name", FORM_DATA, "value", actionSink.getClientData());
+ div.pop();
if (autofocus)
+ {
environment.pop(ValidationDecorator.class);
+ }
}
void cleanupRender()