Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
5.3.6
-
None
Description
Let's create a new Tapestry component called <t:CheckboxField> (pretty inspired name)...
Component Template
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd" xmlns:p="tapestry:parameter"> <t:content> BEGIN <t:if test="modeEdit"> <t:label for="checkboxField"/> <input t:id="checkboxField"/> <p:else> <span class="label">${context.label}</span> <span class="input" t:type="any" t:mixins="NotEmpty">${convertedBooleanValue}</span> </p:else> </t:if> END </t:content> </html>
...and use it in a page:
Page Template
<t:beaneditor t:id="customerEdit" t:object="customer" model="model"> <p:vip> <t:CheckboxField/> </p:vip> </t:beaneditor>
Then, the (plain) text "END" will never get rendered. Of course, normally we would surround it within an HTML element, such as <p> or <div>, but need not be.