You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2013/09/04 02:53:21 UTC
[3/3] git commit: Ensure that the
Ensure that the <label> rendered by the FormGroup mixin includes the "control-label" CSS selector
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/7171439c
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/7171439c
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/7171439c
Branch: refs/heads/master
Commit: 7171439c1e5cc28e11f576c8ca54e78bf54d65eb
Parents: c7d4724
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 3 17:53:14 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 3 17:53:14 2013 -0700
----------------------------------------------------------------------
.../apache/tapestry5/corelib/mixins/FormGroup.java | 14 ++++++++++++--
.../apache/tapestry5/integration/app1/GridTests.java | 2 ++
2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7171439c/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java
index 51d2616..2f86675 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/FormGroup.java
@@ -16,6 +16,8 @@ package org.apache.tapestry5.corelib.mixins;
import org.apache.tapestry5.Field;
import org.apache.tapestry5.MarkupWriter;
+import org.apache.tapestry5.ValidationDecorator;
+import org.apache.tapestry5.annotations.Environmental;
import org.apache.tapestry5.annotations.HeartbeatDeferred;
import org.apache.tapestry5.annotations.InjectContainer;
import org.apache.tapestry5.dom.Element;
@@ -37,18 +39,26 @@ import org.apache.tapestry5.dom.Element;
*/
public class FormGroup
{
-
@InjectContainer
private Field field;
private Element label;
+ @Environmental
+ private ValidationDecorator decorator;
+
void beginRender(MarkupWriter writer)
{
writer.element("div", "class", "form-group");
- label = writer.element("label");
+
+ decorator.beforeLabel(field);
+
+ label = writer.element("label", "class", "control-label");
writer.end();
+
fillInLabelAttributes();
+
+ decorator.afterLabel(field);
}
@HeartbeatDeferred
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7171439c/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java
index a4084b0..69bdbd1 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java
@@ -16,11 +16,13 @@ package org.apache.tapestry5.integration.app1;
import org.apache.tapestry5.corelib.components.Grid;
import org.apache.tapestry5.integration.TapestryCoreTestCase;
+import org.apache.tapestry5.test.TapestryTestConfiguration;
import org.testng.annotations.Test;
/**
* Tests for the {@link Grid} component.
*/
+@TapestryTestConfiguration(webAppFolder = "src/test/app1")
public class GridTests extends TapestryCoreTestCase
{