struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Kelly" <ke...@ipe.fzk.de>
Subject Re: Rendering alternate rows of a table in Struts
Date Mon, 10 Feb 2003 08:03:36 GMT
I really need to move to the states and get me some of that blunt action!

----- Original Message ----- 
From: "Mark Galbreath" <mark_galbreath@qat.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
Sent: Friday, February 07, 2003 9:18 PM
Subject: RE: Rendering alternate rows of a table in Struts


> And why aren't you sharing?
> 
> -----Original Message-----
> From: Durham David Cntr 805CSS/SCBE [mailto:David.Durham1@scott.af.mil] 
> Sent: Friday, February 07, 2003 2:52 PM
> 
> What kind of smoke break are you taking?
> 
> > -----Original Message-----
> > From: Ken Anderson [mailto:KAnderso.IFMC@sdps.org]
> > Sent: Friday, February 07, 2003 1:45 PM
> > 
> > Personally I prefer the new Java Magic library. You just
> > sprinkle the magic dust on your keyboard and say the magic 
> > words and BAM you got table rows with alternating colors. 
> > This way I don't have to argue with my fellow developers over 
> > scriplets vs. custom tags. We just all rely on Java Magic and 
> > go take smoke breaks.
> > 
> > >>> mark_galbreath@qat.com 02/07/03 01:35PM >>>
> > Oh, and cutting and pasting tags is better?  With scriptlets,
> > you need to
> > know one thing: Java.  With taglibs you must expand and 
> > juggle knowledge by
> > an order of magnitude.  Anybody who knows Java can understand 
> > a scriptlet;
> > the converse cannot be said of taglibs.
> > 
> > Mark
> > 
> > -----Original Message-----
> > From: Durham David Cntr 805CSS/SCBE
> > [mailto:David.Durham1@scott.af.mil] 
> > Sent: Friday, February 07, 2003 2:25 PM
> > 
> > Taglibs aren't just useful to people working with HTML, they
> > are a great way
> > to reuse logic in JSP's.  Cutting and pasting scriplets IMO is not.
> > 
> > -Dave
> > 
> > > -----Original Message-----
> > > From: Mark Galbreath [mailto:mark_galbreath@qat.com]
> > > Sent: Friday, February 07, 2003 1:07 PM
> > > 
> > > Well, let's be honest, dude.  The great idea behind taglibs in the 
> > > first place was to allow non-developers such as HTMLers and graphic
> > > artists to be
> > > able to manipulate content without understanding a 
> > > programming language and
> > > keep real programmers (yes, I have a definition, if you are 
> > > interested) from
> > > having to maintain the presentation layer.  Now, from that 
> > > perspective, look
> > > and my example and look at yours.  Which is going to be clearer to a
> > > non-programmer?
> > > 
> > > Otherwise, look how complex using a taglib is to integrate into an
> > > application, to say nothing of what it takes to develop a custom 
> > > taglib (I've done it).  I may sound like a heretic, but in my mind, 
> > > SIMPLE scriptlets are better than a tag to do the same thing - from
> > > development,
> > > integration, and maintenance perspectives.
> > > 
> > > Mark (they don't call me Chief Eating Crow for nothing) Galbreath
> > > 
> > > -----Original Message-----
> > > From: Rob Kischuk [mailto:Rob.Kischuk@Mentisys.com]
> > > Sent: Friday, February 07, 2003 11:13 AM
> > > 
> > > > That's all well and good but what happens when the author
> > no longer
> > > supports
> > > > it, technology moves on, and somebody behind you has got to
> > > maintain
> > > > it? Doing it with scriptlets is as easy as
> > > >
> > > > <% int count = 0 %>
> > > > <logic:iterate . . .>
> > > >   <% if( count % 2 == 0 ) { %>
> > > >     <tr bgcolor="coral">
> > > >       <td></td>
> > > >   <% } else { %>
> > > >     <tr bgcolor="fuscia">
> > > >       <td></td>
> > > >   <% } %>
> > > >   </tr>
> > > >   <% count++ %>
> > > > </logic:iterate>
> > > >
> > > > What could be simpler and clearer?  This methodology is
> > > much easier to
> > > > maintain than some esoteric third-party tags.
> > > 
> > > <c:forEach var="currItem" items="${myCollection}" varStatus="info">
> > >   <c:if test="${info.count % 2 == 0}">
> > >      <tr bgcolor="coral">
> > >   </c:if>
> > >   <c:if test="${info.count % 2 == 1}">
> > >      <tr bgcolor="fuschia">
> > >   </c:if>
> > >     <td>blah blah</td>
> > >   </tr>
> > > </c:forEach>
> > > 
> > > Simple. Clear. Standard.  The logic is plain, JSTL isn't going to 
> > > have the maintenance issues you mention, and there's no nasty
> > > scriptlet delimiters
> > > muddling the mix.
> > > 
> > > -Rob
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message