struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>
Subject Re: Calculate module of index in Struts2 iterator
Date Fri, 24 Dec 2010 18:29:36 GMT
Thanks for the advice!! I'll follow it.

2010/12/24 Dale Newfield <dale@newfield.org>

> On 12/24/10 6:15 AM, JOSE L MARTINEZ-AVIAL wrote:
>
>> <s:if test="(#fieldNameStatus.index % 10 )==0">xxxxx</s:if>
>>
>
> I guess I've not been around on this list much lately (darned work :-/ ).
>  So my constant harping about this hasn't been so constant:
>
> I *really* advise people to always use %{} when writing OGNL in a taglib
> attribute.  It makes it clear what is to be evaluated as an OGNL expression
> and what's just text.  It's not just for readability and maintainability --
> it's also to future-proof your code.  In the future struts may be able to
> use more ELs than just OGNL, and its the character out front (% = OGNL; $ =
> EL; # = JUEL (IIRC -- maybe it was MVEL?)) that'll indicate the el to be
> used.
>
>
> <s:if test="%{(#fieldNameStatus.index % 10)==0}">xxxxx</s:if>
>
> -Dale
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message