struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Cook" <James.C...@wecomm.com>
Subject RE: Iterate over an ArrayList of arrays
Date Tue, 11 May 2010 14:17:14 GMT
Where does 'top' come from?

-----Original Message-----
From: Dale Newfield [mailto:dale@newfield.org] 
Sent: 11 May 2010 14:49
To: Struts Users Mailing List
Cc: Steven Yang
Subject: Re: Iterate over an ArrayList of arrays

On 5/11/10 5:59 AM, Steven Yang wrote:
> try
> <s:iterator value="breadcrumbs">
>                         <li><a href="${top[1]}">${top[0]}</a></li>
>                 </s:iterator>

Except you're using EL here to access OGNL.  I'd suggest this is
cleaner:

<s:iterator value="breadcrumbs">
   <li><a href="<s:property value='%{top[1]}'/>"><s:property 
value="%{top[0]}"/></a></li>
</s:iterator>

-Dale

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


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


Mime
View raw message