You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mohan Radhakrishnan <Mo...@hclcomnet.co.in> on 2002/11/30 04:52:38 UTC

Stuts tags / No EL

Hi,
          
    A simple question.

Is it possible to use only struts tags ( No EL )and no scriptlets to do the
following

				<logic:iterate id="item" name="table1"
indexId="index" offset="1">
				<%
				 if ( index.intValue() % 2 ==  0 ){
				%>
 This is just to check the modulus and alternate colors in the HTML table.

 Hope the subject of the mail is imaginative to attract attention. 

Thanks,
Mohan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Stuts tags / No EL

Posted by "David M. Karr" <dm...@earthlink.net>.
>>>>> "Mohan" == Mohan Radhakrishnan <Mo...@hclcomnet.co.in> writes:

    Mohan> Hi,
    Mohan>     A simple question.

    Mohan> Is it possible to use only struts tags ( No EL )and no scriptlets to do the
    Mohan> following

    Mohan> 				<logic:iterate id="item" name="table1"
    Mohan> indexId="index" offset="1">
    Mohan> 				<%
    Mohan> 				 if ( index.intValue() % 2 ==  0 ){
    Mohan> 				%>
    Mohan>  This is just to check the modulus and alternate colors in the HTML table.

Well, if you're really determined to avoid both scriptlets and the EL, then
your only option is to write a custom tag, where the references to it would
look like this:

<logic:iterate id="item" name="table1" indexId="index" offset="1">
 <t:even var="index">
...
 </t:even>
 <t:odd var="index">
...
 </t:odd>
</logic:iterate>



-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net   ; SCJP



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>