FrequentlyAskedQuestions/OptionalParameters

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.

last edited 2004-06-21 12:01:35 by pad-cache2-1