[ 
https://issues.apache.org/jira/browse/TAP5-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16935046#comment-16935046
 ] 

ASF subversion and git services commented on TAP5-2615:
-------------------------------------------------------

Commit 7b1b5bb4b1e5c5c2c6c1816e7b7f4d034008311f in tapestry-5's branch 
refs/heads/master from Thiago H. de Paula Figueiredo
[ https://gitbox.apache.org/repos/asf?p=tapestry-5.git;h=7b1b5bb ]

TAP5-2615: If component now has an optional 'then' block parameter

> "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
>            Priority: Minor
>
> 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