On Tue, 15 May 2001, Johan Compagner wrote:
> Great idee's!!
Sounds good to me. There is also progress on conditional tags in the
Standard Tag Libraries effort that may or may not go in a similar
direction -- but that shouldn't stop us from building on the existing
concepts in the mean time.
> First thing to be included after the final of 1.0??
>
Also sounds good -- I'm going to get 1.0-beta-2 out tonight no matter how
little sleep I end up with .... (Tomcat fires took precedence,
unfortunately).
> johan
>
Craig
>
> ----- Original Message -----
> From: "Niall Pemberton" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, May 15, 2001 8:15 AM
> Subject: IF / ELSE and SWITCH/CASE Tags
>
>
> > Can I submit these logic tags for inclusion in Struts - they are on the
> TODO
> > list for 1.1?
> >
> > Attached are tags to do If/Else and Switch/Case logic, based on existing
> > Struts logic tag classes - the key classes inherit from the Struts
> > CompareTagBase.
> >
> > 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.
> >
> > Example Usage:
> >
> > <logic:if op="GreaterThan" name="testbean" property="doubleProperty"
> > value="400">
> > <logic:then>
> > Property Greater Than Value
> > </logic:then>
> > <logic:else>
> > Property Not Greater Than Value
> > </logic:else>
> > </logic:if>
> >
> >
> > 2) SWITCH/CASE: (SwitchTag, CaseTag, DefaultTag)
> >
> > Example Usage:
> >
> > <logic:switch name="testbean" property="doubleProperty">
> > <logic:case value ="1">1 matched</logic:case>
> > <logic:case value ="321">321 matched 1st</logic:case>
> > <logic:case value ="321">321 matched 2nd</logic:case>
> > <logic:case value ="555">555 matched</logic:case>
> > <logic:default>No values matched - default processing</logic:default>
> > </logic:switch>
> >
> > [[ LOGIC.ZIP : 1568 in winmail.dat ]]
> >
>
>