struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken <ken.mcwilli...@aerose.com>
Subject Re: OGNL to get list of keys
Date Thu, 01 Jul 2010 19:51:10 GMT
This produced the desired effect:
(added var="header" to iterator tag)

                    <s:iterator value="list[0].keys" var="header">
                        <th><s:property value="header"/></th>
                    </s:iterator>

On Thu, 2010-07-01 at 12:47 -0600, Ken wrote:

> In my jsp I have:
> 
>                     <s:iterator value="list[0].keys">
>                         <th><s:property value="#this"/></th>
>                     </s:iterator>
> 
> Where list, is a List<Map>...
> 
> The above produces the following html:
> 
>                         <th>[id,
> app.mz.address.CompanyNameLister@e8e3b0,
> com.opensymphony.xwork2.DefaultTextProvider@178cce2]</th>
>                     
>                         <th>[curName,
> app.mz.address.CompanyNameLister@e8e3b0,
> com.opensymphony.xwork2.DefaultTextProvider@178cce2]</th>
>                     
>                         <th>[group,
> app.mz.address.CompanyNameLister@e8e3b0,
> com.opensymphony.xwork2.DefaultTextProvider@178cce2]</th>
>                     
>                         <th>[oldName,
> app.mz.address.CompanyNameLister@e8e3b0,
> com.opensymphony.xwork2.DefaultTextProvider@178cce2]</th>
> 
> When I expected to see:
>                         <th>id</th>
>                     
>                         <th>curName</th>
>                     
>                         <th>group</th>
>                     
>                         <th>oldName</th>
> 
> I must be missing something terribly obvious! Help.




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