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/12/03 19:29:26 UTC
[2/6] git commit: Have the Palette component invoke its field
validator to write correct client-side validation data attributes into the
main select element
Have the Palette component invoke its field validator to write correct client-side validation data attributes into the main select 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/872df617
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/872df617
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/872df617
Branch: refs/heads/5.4-js-rewrite
Commit: 872df61744bed9c5352283afb2a28fbdf7b37222
Parents: c95128a
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Mon Dec 3 10:20:31 2012 -0800
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Mon Dec 3 10:20:31 2012 -0800
----------------------------------------------------------------------
.../tapestry5/corelib/components/Palette.java | 5 +++++
.../tapestry5/corelib/components/Palette.tml | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/872df617/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Palette.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Palette.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Palette.java
index cbf4150..1d49766 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Palette.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Palette.java
@@ -278,4 +278,9 @@ public class Palette extends AbstractField
{
return disabled ? "disabled" : null;
}
+
+ void onBeginRenderFromSelected(MarkupWriter writer)
+ {
+ validate.render(writer);
+ }
}
http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/872df617/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml
index 0935cc8..d438426 100644
--- a/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml
+++ b/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/Palette.tml
@@ -43,7 +43,7 @@
<div class="t-palette-title">
<t:delegate to="selectedLabel"/>
</div>
- <select id="${clientId}" multiple="multiple" size="${size}" disabled="${disabledValue}">
+ <select t:type="any" t:id="selected" id="${clientId}" multiple="multiple" size="${size}" disabled="${disabledValue}" t:mixins="rendernotification">
<t:remove>Starts empty, populated on the client side.</t:remove>
</select>
</div>