[ 
https://issues.apache.org/jira/browse/TAP5-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thiago H. de Paula Figueiredo resolved TAP5-2615.
-------------------------------------------------
    Fix Version/s: 5.5.0
         Assignee: Thiago H. de Paula Figueiredo
       Resolution: Fixed

> "If" component should have an optional "then" parameter
> -------------------------------------------------------
>
>                 Key: TAP5-2615
>                 URL: https://issues.apache.org/jira/browse/TAP5-2615
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>            Reporter: Thiago H. de Paula Figueiredo
>            Assignee: Thiago H. de Paula Figueiredo
>            Priority: Minor
>             Fix For: 5.5.0
>
>
> Right now, if you use {{If}} and have a {{then}} parameter, the template 
> looks odd, since {{else}} isn't in the same nesting and indentation level as 
> the {{then}} part. Example:
> {code}
> <t:if test="something">
>     something is true
>     <p:else>
>         something is false
>     </p:else>
> <t:if>
> {code}
> A {{then}} parameter would allow everything to be in the same nesting and 
> indentation level. Example:
> {code}
> <t:if test="something">
>     <p:then>
>         something is true
>     </p:then>
>     <p:else>
>         something is false
>     </p:else>
> <t:if>
> {code}
> If {{then}} is missing, everything works as in the past (if test is true, 
> render the body of the If except for the {{else}} block; otherwise, render 
> the {{else}} block). If {{then}} is present, everything outside {{then}} and 
> {{else}} won't appear regardless of the test being true or false.
> {{else}} should also be present in the {{Unless}} component, since it and 
> {{If}} have almost all their logic inherited from {{AbstractConditional}}, 
> their superclass.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to