• 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
  • Tim Cooke
  • Junilu Lacar
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
  • Carey Brown
  • salvin francis
  • Claude Moore

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: 13447
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:

"I know this defies the law of gravity... but I never studied law." -B. Bunny Defiant tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!