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 2013/09/04 02:53:19 UTC[1/3] git commit: Add missing "btn-default" to the cancel button Updated Branches:
refs/heads/master 2cef4982e -> 7171439c1
Add missing "btn-default" to the cancel button
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/89ade372
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/89ade372
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/89ade372
Branch: refs/heads/master
Commit: 89ade3722dbe6c5695110945f97635d8c6cd2bb4
Parents: 2cef498
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 3 17:30:38 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 3 17:30:38 2013 -0700
----------------------------------------------------------------------
.../org/apache/tapestry5/corelib/components/BeanEditForm.tml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/89ade372/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanEditForm.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanEditForm.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanEditForm.tml
index dd17d12..99b747d 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanEditForm.tml
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanEditForm.tml
@@ -10,7 +10,7 @@
</div>
<t:if test="cancel">
<div class="btn-group">
- <t:submit t:id="cancel" mode="cancel" class="btn" value="message:core-cancel-label"/>
+ <t:submit t:id="cancel" mode="cancel" class="btn btn-default" value="message:core-cancel-label"/>
</div>
</t:if>
</div>
[2/3] git commit: Make use of FormGroup mixin Modify PropertyEditor
to begin/end a Heartbeat, needed by FormGroup mixin
Posted by hl...@apache.org. Make use of FormGroup mixin
Modify PropertyEditor to begin/end a Heartbeat, needed by FormGroup mixin
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/c7d47248
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/c7d47248
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/c7d47248
Branch: refs/heads/master
Commit: c7d4724836c5afeea47c22073b371b9f0515b148
Parents: 89ade37
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 3 17:31:12 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 3 17:31:12 2013 -0700
----------------------------------------------------------------------
.../corelib/components/PropertyEditor.java | 9 ++++-
.../corelib/pages/PropertyEditBlocks.tml | 42 ++++----------------
2 files changed, 16 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7d47248/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
index 7a04dc6..c79c192 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008, 2009, 2011, 2012 The Apache Software Foundation
+// Copyright 2007-2013 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -140,6 +140,9 @@ public class PropertyEditor
@Environmental
private FormSupport formSupport;
+ @Inject
+ private Heartbeat heartbeat;
+
private PropertyModel propertyModel;
BeanBlockSource defaultBeanBlockSource()
@@ -217,6 +220,8 @@ public class PropertyEditor
{
beanValidationContext.setCurrentProperty(propertyName);
}
+
+ heartbeat.begin();
}
/**
@@ -225,6 +230,8 @@ public class PropertyEditor
*/
void cleanupEnvironment()
{
+ heartbeat.end();
+
environment.pop(PropertyEditContext.class);
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7d47248/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml
index d8e4e12..b22f161 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml
@@ -1,25 +1,16 @@
-<div xml:space="default" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
+<div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
<t:block id="text">
- <div class="form-group">
- <t:label for="textField"/>
- <input t:id="textField"/>
- </div>
+ <input t:mixins="formgroup" t:id="textField"/>
</t:block>
<t:block id="number">
- <div class="form-group">
- <t:label for="numberField"/>
- <input t:id="numberField" class="t-number"/>
- </div>
+ <input t:id="numberField" t:mixins="formgroup" class="t-number"/>
</t:block>
<t:block id="enum">
- <div class="form-group">
- <t:label for="select"/>
- <input t:id="select"/>
- </div>
+ <input t:id="select" t:mixins="formgroup"/>
</t:block>
<t:block id="boolean">
@@ -30,40 +21,23 @@
${context.label}
</label>
</div>
-
</t:block>
<t:block id="date">
-
- <div class="form-group">
- <t:label for="dateField"/>
- <input t:id="dateField"/>
- </div>
-
+ <input t:id="dateField" t:mixins="formgroup"/>
</t:block>
<t:block id="calendar">
-
- <div class="form-group">
- <t:label for="calendarField"/>
- <input t:id="calendarField"/>
- </div>
-
+ <input t:id="calendarField" t:mixins="formgroup"/>
</t:block>
<t:block id="password">
- <div class="form-group">
- <t:label for="passwordField"/>
- <input t:id="passwordField"/>
- </div>
+ <input t:id="passwordField" t:mixins="formgroup"/>
</t:block>
<t:block id="longtext">
- <div class="form-group">
- <t:label for="textarea"/>
- <textarea t:id="textarea"/>
- </div>
+ <textarea t:id="textarea" t:mixins="formgroup"/>
</t:block>
</div>
\ No newline at end of file
[2/3] git commit: Make use of FormGroup mixin Modify PropertyEditor
to begin/end a Heartbeat, needed by FormGroup mixin
Posted by hl...@apache.org. Make use of FormGroup mixin
Modify PropertyEditor to begin/end a Heartbeat, needed by FormGroup mixin
Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/c7d47248
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/c7d47248
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/c7d47248
Branch: refs/heads/master
Commit: c7d4724836c5afeea47c22073b371b9f0515b148
Parents: 89ade37
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Tue Sep 3 17:31:12 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Tue Sep 3 17:31:12 2013 -0700
----------------------------------------------------------------------
.../corelib/components/PropertyEditor.java | 9 ++++-
.../corelib/pages/PropertyEditBlocks.tml | 42 ++++----------------
2 files changed, 16 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7d47248/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
index 7a04dc6..c79c192 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/PropertyEditor.java
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008, 2009, 2011, 2012 The Apache Software Foundation
+// Copyright 2007-2013 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -140,6 +140,9 @@ public class PropertyEditor
@Environmental
private FormSupport formSupport;
+ @Inject
+ private Heartbeat heartbeat;
+
private PropertyModel propertyModel;
BeanBlockSource defaultBeanBlockSource()
@@ -217,6 +220,8 @@ public class PropertyEditor
{
beanValidationContext.setCurrentProperty(propertyName);
}
+
+ heartbeat.begin();
}
/**
@@ -225,6 +230,8 @@ public class PropertyEditor
*/
void cleanupEnvironment()
{
+ heartbeat.end();
+
environment.pop(PropertyEditContext.class);
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/c7d47248/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml
index d8e4e12..b22f161 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.tml
@@ -1,25 +1,16 @@
-<div xml:space="default" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
+<div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
<t:block id="text">
- <div class="form-group">
- <t:label for="textField"/>
- <input t:id="textField"/>
- </div>
+ <input t:mixins="formgroup" t:id="textField"/>
</t:block>
<t:block id="number">
- <div class="form-group">
- <t:label for="numberField"/>
- <input t:id="numberField" class="t-number"/>
- </div>
+ <input t:id="numberField" t:mixins="formgroup" class="t-number"/>
</t:block>
<t:block id="enum">
- <div class="form-group">
- <t:label for="select"/>
- <input t:id="select"/>
- </div>
+ <input t:id="select" t:mixins="formgroup"/>
</t:block>
<t:block id="boolean">
@@ -30,40 +21,23 @@
${context.label}
</label>
</div>
-
</t:block>
<t:block id="date">
-
- <div class="form-group">
- <t:label for="dateField"/>
- <input t:id="dateField"/>
- </div>
-
+ <input t:id="dateField" t:mixins="formgroup"/>
</t:block>
<t:block id="calendar">
-
- <div class="form-group">
- <t:label for="calendarField"/>
- <input t:id="calendarField"/>
- </div>
-
+ <input t:id="calendarField" t:mixins="formgroup"/>
</t:block>
<t:block id="password">
- <div class="form-group">
- <t:label for="passwordField"/>
- <input t:id="passwordField"/>
- </div>
+ <input t:id="passwordField" t:mixins="formgroup"/>
</t:block>
<t:block id="longtext">
- <div class="form-group">
- <t:label for="textarea"/>
- <textarea t:id="textarea"/>
- </div>
+ <textarea t:id="textarea" t:mixins="formgroup"/>
</t:block>
</div>
\ No newline at end of file
[3/3] git commit: Ensure that the rendered by the FormGroup
mixin includes the "control-label" CSS selector
Posted by hl...@apache.org. 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
{
[3/3] git commit: Ensure that the rendered by the FormGroup
mixin includes the "control-label" CSS selector
Posted by hl...@apache.org. 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
{