View source
ID Name static value row number (testit_rowNum) ((ListObject)testit).getMoney()
25944 Erat Dolor static 1 8177.0
80546 Aliquyam Vero static 2 9004.0
68274 Nonumy Amet static 3 9490.0
18632 Vero Dolore static 4 309.0
97237 Sanctus Stet static 5 5425.0
2019 Takimata Et static 6 3801.0
16868 Tempor Nonumy static 7 8761.0
86693 Clita Et static 8 1941.0
55238 Voluptua Et static 9 3171.0
24531 Consetetur Vero static 10 7903.0

If you add an id attribute the table tag makes the object corresponding to the given row available in the page context so you could use it inside scriptlet code or some other tag. Another implicit object exposed by the table tag is the row number, named id _rowNum .

These objects are saved as attributes in the page scope (you can access it using pageContext.getAttribute("id") ). They are also defined as nested variables (accessible using <%=id%> ), but only if the value of the id atribute is not a runtime expression. The preferred way for fetching the value is to always use pageContext.getAttribute().

If you do not specify the id attribute no object is added to the pagecontext by the table tag

This is a simple snippet which shows the use of the implicit objects created by the table tag with JSTL.


  <display:table id="row" name="mylist">
    <display:column title="row number" >
      <c:out value=""/>
    </display:column>
    <display:column title="name" >
      <c:out value=""/>
      <c:out value=""/>
    </display:column>
  </display:table>