Menu

Nested table question

Help
2004-11-15
2012-10-08
  • matt_dowell

    matt_dowell - 2004-11-15

    I have a list of "AbstractShipment" objects, and each object in the row has a Set of LineItem objects in them. Here is how I have my JSP set up:

    <display:table name="ships" class="Mars" id="shipment" pagesize="20" requestURI="aPath" export="true" >
    <display:setProperty name="paging.banner.include_first_last" value="true" />
    <display:column... />

    <display:column title="Line Items">
    <display:table name="<%="((AbstractShipment)ships.item[" + (shipment_rowNum.intValue() -1)+ "]).lineItems"%>" id="child" class="simple sublist">
    <display:column property="product.name" />
    <display:column property="comments" />
    </display:table>
    </display:column>

    Can anyone see why this is not working?

     
    • jccastro

      jccastro - 2005-05-20

      i solve this issue
      the example doesnt work because they use their own type of List (TestList) i think wich has a (getItem) method
      this is whtat i did to get the nested tables work usign an arrayList

      First i declare the appropiate import to make the Cast
      <%@page import="com.adnsystems.komori.portal.Expense"%>

      then at the top of the jsp I had to declare the list
      <jsp:useBean id="myList" scope="request" class="java.util.ArrayList"/>

      and the inside my table i declare the nested table

      <display:column title="Title">
      <display:table name="<%=((Expense)myList.get(parent_rowNum.intValue() -1)).getSubList()%>" >
      <display:column property="description" title="Description" />
      <display:column property="mount" />
      </display:table>
      </display:column>

      i hope this help someone
      if somebody has a better idea please pos it

       
    • dahagama naresh k

      me too got the same issue...did u solve it

       

Log in to post a comment.