[
https://issues.apache.org/jira/browse/TAPESTRY-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12475122
]
Howard M. Lewis Ship commented on TAPESTRY-1276:
------------------------------------------------
It's more verbose for some things, but I quite often find I need two ifs: for
the normal case, and one for the else case. This merges both cases together
with a minimum of fuss.
I'm not saying the negate parameter is bad (T4 has an equivalent "invert"
parameter), but there may be other options that are better, such as extending
the property expression syntax to support an inversion operator, i.e.
<t:comp type="if" test="! order.lineItems">
. . .
</t:comp>
Another option would be to create an Unless component:
<t:comp type="unless" test="order.lineItems">
. . .
</t:comp>
I find both of these preferable to a negate or invert parameter.
> IF component should include an optional 'negate' parameter
> ----------------------------------------------------------
>
> Key: TAPESTRY-1276
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1276
> Project: Tapestry
> Issue Type: New Feature
> Components: Core
> Affects Versions: 5.0
> Environment: MacOS X 10.4.8, Eclipse 3.2.1
> Reporter: Randy Leonard
> Priority: Minor
> Fix For: 5.0
>
>
> It would be useful for the 'If' component to take an optional 'negate'
> parameter, much like the WOCondition component in WebObjects. This would
> allow the component content to be rendered if the associated condition is
> FALSE instead of TRUE, therefore eliminating the need to write an additional
> Java method to perform this negate operation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]