My personal preference is for the JSTL style

<t:choose>
   <t:when test="test1">value1</t:when>
   <t:when test="test2">value2</t:when>
   <t:otherwise>default</t:otherwise>
</t:choose>


On 12 July 2013 19:54, Thiago H de Paula Figueiredo <[email protected]>wrote:

> On Fri, 12 Jul 2013 14:41:04 -0300, Barry Books <[email protected]> wrote:
>
>  I don't like it either. Perhaps it should be
>>
>> <t:if test="checked'>
>> <p:then>
>> </p:then>
>> <p:else>
>> </p:else>
>> </t:if>
>>
>
> IMHO this looks way better then just <p:else>, but I still prefer the two
> If instances version. Matter of taste, probably.
>
>
>
>>
>> On Fri, Jul 12, 2013 at 7:51 AM, Thiago H de Paula Figueiredo <
>> [email protected]> wrote:
>>
>>  On Thu, 11 Jul 2013 23:21:28 -0300, Taha Hafeez Siddiqi <
>>> [email protected]> wrote:
>>>
>>>  You can try
>>>
>>>>
>>>> <t:if test='checked'>
>>>>    <input type='checkbox' name='leaf' id='leaf' value='leaf'
>>>> checked='checked'/>
>>>>
>>>>    <p:else>
>>>>        <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>>>>    </p:else>
>>>> </t:if>
>>>>
>>>>
>>> Better yet (I hate using p:else. I think it's quite confusing to have the
>>> else part inside the if part),
>>>
>>>
>>> <t:if test='checked'>
>>>     <input type='checkbox' name='leaf' id='leaf' value='leaf'
>>> checked='checked'/>
>>> </t:if>
>>> <t:if test='!checked'>
>>>
>>>      <input type='checkbox' name='leaf' id='leaf' value='leaf'/>
>>> </t:if>
>>>
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>>
>>> ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: 
>>> users-unsubscribe@tapestry.**a**pache.org<http://apache.org>
>>> <users-unsubscribe@**tapestry.apache.org<[email protected]>
>>> >
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org<[email protected]>
>
> For additional commands, e-mail: [email protected]
>
>

Reply via email to