• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Iterating Collection of Integer

 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

It seemed a bit easy first but got confused.I want to use logic:iterate to iterate a list of Integer .

Iteration through a collection of object is very easy as we use the id attribute and say attribute.property which invokes the get method of associated with that property.How do we achieve this for collection of Integer?

Thanks in Advance
Cheers
Shiv
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does this not work?
 
ShivPrakash Srivastava
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No...it gives me following error

Wrong format string: 'org.apache.struts.taglib.bean.format.int''

Cheers
Shiv
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, sorry, my fault--I think using <bean:write> you need to use a format--since you're not using one from a resource file you need to specify one in the <bean:write> tag. I *think* it's as simple as adding a format="#" to the tag (whatever the Java decimal format stuff looks like; I don't rememver).
 
reply
    Bookmark Topic Watch Topic
  • New Topic