NOTE: This is outdated information that applies only to Tapestry 4. For current information see http://tapestry.apache.org/component-templates.html#ComponentTemplates-Expansions. |
Question:
I have a button that I'm creating using the @Any component. I'd like to be able to set the disabled attribute conditionally. Is there an easy to do this with Tapestry?
Answer:
<button jwcid="@Any" disabled="ognl:disabled ? 'disabled' : null"/>
Informal parameters with null values do not get rendered as informal attributes.