Repository: tapestry-5 Updated Branches: refs/heads/master 32e8e2f62 -> a4fe5cedc
TAP5-2223 : New "secure" flag in Select component has a bug when using option groups Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/a4fe5ced Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/a4fe5ced Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/a4fe5ced Branch: refs/heads/master Commit: a4fe5cedcd06ac5f438d04d9e3daaae1164a2381 Parents: 32e8e2f Author: ffacon <ffa...@apache.org> Authored: Sat Feb 15 16:22:05 2014 +0100 Committer: ffacon <ffa...@apache.org> Committed: Sat Feb 15 16:22:05 2014 +0100 ---------------------------------------------------------------------- tapestry-core/src/test/app1/OptionGroupForm.tml | 2 +- .../tapestry5/integration/app1/FormTests.java | 17 +++++++++++++++++ .../tapestry5/integration/app1/pages/Index.java | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a4fe5ced/tapestry-core/src/test/app1/OptionGroupForm.tml ---------------------------------------------------------------------- diff --git a/tapestry-core/src/test/app1/OptionGroupForm.tml b/tapestry-core/src/test/app1/OptionGroupForm.tml index 2722161..9ec0dca 100644 --- a/tapestry-core/src/test/app1/OptionGroupForm.tml +++ b/tapestry-core/src/test/app1/OptionGroupForm.tml @@ -2,7 +2,7 @@ <h1>Simple Option Group </h1> <t:form t:id="form"> - <t:select t:id="select" t:value="entity" t:model="model"/> + <select t:type="Select" t:id="entity" t:value="entity" t:model="model"/> <t:submit /> </t:form> http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a4fe5ced/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 a45d1ed..946a0bb 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 @@ -1134,4 +1134,21 @@ public class FormTests extends App1TestCase clickAndWait(SUBMIT); assertTextPresent("Result = '!@#$%^&*()_+='"); } + + /** + * TAP5-2223. + */ + @Test + public void optionGroup_form() + { + openLinks("OptionGroupForm Demo"); + + assertTextPresent("entity.id: [1]"); + + select("entity", "label2"); + + clickAndWait(SUBMIT); + + assertTextPresent("entity.id: [2]"); + } } http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/a4fe5ced/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java ---------------------------------------------------------------------- diff --git a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java index 0fa9207..6baf728 100644 --- a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java +++ b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java @@ -291,7 +291,7 @@ public class Index new Item("simpleform", "SimpleForm", "first pass at writing Form and TextField components"), - new Item("OptionGroupForm", "OptionGroupForm", "Select with Option Group"), + new Item("OptionGroupForm", "OptionGroupForm Demo", "Select with Option Group"), new Item("validform", "ValidForm", "server-side input validation"),