• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

logic iterate tag- how to use?  RSS feed

Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what should i put here as property name?
property="property name"
<tr class="tblcaption">
<td><bean:message key="tableColumn.Name"/></td>
<td><bean:message key="tableColumn.status"/></td>
<td><bean:message key="tableColumn.source"/></td>
<tr class="tblcellseparator">
<td colspan="26"></td>

<%GridInfo gridInfo=request.getAttribute("gridInfo");
List testList=gridInfo.getColumnInfoList();
<logic:iterate id="test" name"testList">
<TD><bean:write name="test" property="property name "></TD>

Posts: 12475
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the elements of testList? What property of the elements of testList do you want to display? For example, if the testList elements have a getter called "getSomeProperty()" which you'd like to display, you'd write:

<bean:write name="test" property="someProperty" />

If you just wanted to call the toString() method of the list elements, then you don't even have to specify property:

<bean:write name="test" />

is equivalent to calling the toString() method of each list element.

I personally would prefer using JSTL:

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!