Showing Total using tableDecorater

  • ritesh kumar

    ritesh kumar - 2004-10-06

    hai i m using datasource for displaying data. and i want to use tabedecorater class for showing some sum of data. but when i try to use getCurrentRowObject() it return null value .

    is there any solution or it is bug.



    • Pradeep

      Pradeep - 2005-01-19

      try with dynabean

      Connection con = ...; // just open a connection

        Statement stmt = con.createStatement();
        ResultSet rs = stmt.executeQuery(&quot;SELECT * from table&quot;);
        RowSetDynaClass resultSet = new RowSetDynaClass(rs, false);
        request.setAttribute(&quot;results&quot;, resultSet);


        &lt;display:table name=&quot;requestScope.results.rows&quot; /&gt;
    • Christian Güldner

      I have the same problem, and I am using the RowSetDynaClass as described in iyadurai's reply.

      Any ideas?


      I am using WebSphere 4 (sigh)

      • andy pruitt

        andy pruitt - 2005-03-23

        Current cvs HEAD has support for totals.

        The totals are placed in pageContext for use in the footer, or can be accessed via a custom tag.

    • Christian Güldner

      Sorry, the error I get is not that getCurrentRowObject return s null, it's that the method in my TableDecorator never gets called.
      In the table I have:
      a column-tag with property="link" and of course a decorator="package.MyTableDecorator" attr. in the table-tag.
      In the Decorator I have en method getLink(). This is never called. In stead I get a warning saying that BasicDynaBean does not have a "link" property. (I use RowSetDynaClass)




Log in to post a comment.