Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

iterate through String [] issue

 
Olga Lebedeva
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have been struggling with this one for couple hours now and finally decided to get some help

I have a nested bean that has String [] of days and I need to iterate through that String [] to display days. At this point I get what looks like object's address: [Ljava.lang.String;@7e5c156

<logic:iterate id="myID" name="someForm" property="someForm.transports">
<bean:write name="myID" property="listDays"/><br />
</logic:iterate>

Can you please advise?

Thanks.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For dates, the bean:write tag has to know how to format the date.

Add formatKey="date.format" to your <bean:write> tag. Then add date.format=MM/dd/yyyy to your ApplicationResources.properties file. Naturally the key can be anything you chose, and the format can be any valid date format that could be used by java.text.SimpleDateFormat.
[ July 07, 2005: Message edited by: Merrill Higginson ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic