The following is a suggestion for an additional tag as well as support for
it by other tags.


It'd be great if there were a <logic:do> tag.

        o name - Gives an anchor name to the block.
        o execute - (now, called) Execute right now (and when called) or
just when called (maybe this parameter is unnecessary).

The body of the tag would contain regular JSP/Stuts lines:

<logic:do name="helloWorld" execute="called">
        <H3><bean:message key="helloWorld" /></H3>
</logic:do>

<logic:do name="helloWorlds" execute="called">
        <H3>
                <bean:write name="thisFoo" property="bar" />:
                <bean:message key="helloWorld" />
        </H3>
</logic:do>

Then, for this to be really useful it'd be great of <logic:equal> (as well
as the other logic tags) had some additional functionality.

        o href - Declares an anchor name to execute.

When the parameter href is given, the value parameter is not allowed.
Instead, the value is taken from the body of the logic tag:

<logic:equal name="myForm" property="foo" href="#helloWorld">
        bar
</logic:equal>

The advantage to having the value taken from the body is the ability to use
<bean:write> there as well:

<logic:equal name="myForm" property="foo" href="#helloWorld">
        <bean:write name="myForm" property="bar" />
</logic:equal>

In the case of iterate, there is no value parameter, so no body is allowed
either:

<logic:iterate name="myForm" property="thisFoo" id="foos"
href="#helloWorlds" />


Anthony

It is by caffeine alone I set my mind in motion.
It is by the Beans of Java that thoughts acquire speed,
the hands acquire shaking, the shaking becomes a warning.
It is by caffeine alone I set my mind in motion.

Reply via email to