> 1) IF/ELSE: (IfTag, ThenTag, ElseTag)
>
> The IfTag provides the same functionality as the Equal, NotEqual,
> LessEqual, LessThan, GreaterThan, GreaterEqual, Match, NoMatch,
> Present, NotPresent tags by specifying that in the "op" attribute.
Why not just continue to use the existing tags for the initial test, and
only add an ELSE tag (used in the same way) to handle the alternate
case? Or, if a symmetrical solution is preferred, one could still use
the THEN tags inside the existing logic test tags.
However, I would actually like to see something more flexible, including
the addition of AND and OR tags for wrapping a set of conditions. Maybe
something like:
<logic:conditional>
<logic:and>
<logic:equal name="bean" property="myProp" value="1"/>
...
</logic:and>
<logic:onTrue>
<bean:write ... >
</logic:onTrue>
<logic:onFalse>
...
</logic:onFalse>
</logic:conditional>
For the simple case, the <logic:and> might be replaced with a
<logic:test>, or perhaps the test tag can simply be used in its place,
the AND and OR simply being special case tests with bodies that contain
more tests. If this could be made compatible with the existing system,
without making the new functionality too ugly to use, that would be even
better.
I'm not set on any of the tag names; I just wanted to make clear their
purposes. Suggestions for improvements are welcomed.
--
Michael Hackett
Developer, Pictorius Inc.