You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2015/03/30 09:39:58 UTC

tapestry-5 git commit: TAP5-2442: CheckList component disabled parameter

Repository: tapestry-5
Updated Branches:
  refs/heads/master e91d8ca49 -> 133471ebf


TAP5-2442: CheckList component disabled parameter


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/133471eb
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/133471eb
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/133471eb

Branch: refs/heads/master
Commit: 133471ebfeb4df6cd23e0cc6f89bc826b0092d99
Parents: e91d8ca
Author: Nicolas Bouillon <ni...@bouil.org>
Authored: Tue Mar 24 15:37:51 2015 +0100
Committer: Jochen Kemnade <jo...@eddyson.de>
Committed: Mon Mar 30 09:39:22 2015 +0200

----------------------------------------------------------------------
 .../java/org/apache/tapestry5/corelib/components/Checklist.java  | 4 ++++
 tapestry-core/src/test/app1/DisabledFields.tml                   | 2 ++
 .../java/org/apache/tapestry5/integration/app1/FormTests.java    | 2 ++
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/133471eb/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Checklist.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Checklist.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Checklist.java
index 2f0616a..1f94f71 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Checklist.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Checklist.java
@@ -109,6 +109,10 @@ public class Checklist extends AbstractField
                 checkbox.attribute("checked", "checked");
             }
 
+            if (isDisabled()) {
+                writer.attributes("disabled", "disabled");
+            }
+
             writer.write(model.getLabel());
             writer.end();
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/133471eb/tapestry-core/src/test/app1/DisabledFields.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/app1/DisabledFields.tml b/tapestry-core/src/test/app1/DisabledFields.tml
index eaa3207..5124327 100644
--- a/tapestry-core/src/test/app1/DisabledFields.tml
+++ b/tapestry-core/src/test/app1/DisabledFields.tml
@@ -49,6 +49,8 @@
     <t:palette t:id="palette" selected="values" disabled="true" encoder="encoder"
                model="literal:Fred,Barney,Wilma,Betty"/>
 
+    <t:checklist t:id="checklist" selected="values" disabled="true" encoder="encoder"
+               model="literal:Fred,Barney,Wilma,Betty"/>
 
     <t:submit t:id="submit" disabled="true" value="Disabled Submit"/>
     <input class="btn btn-default" type="submit" value="Continue"/>

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/133471eb/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
index 4f8a55f..fb595cc 100644
--- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
+++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/FormTests.java
@@ -494,6 +494,8 @@ public class FormTests extends App1TestCase
 
                         "//div[@class='palette-selected']//select",
 
+                        "//input[@name='checklist']",
+
                         "//input[@id='submit_0']"};
 
         for (String path : paths)