Brilliant, thanks. I haven't tried it yet, but it makes sense to me and I don't see why it shouldn't work.
--sam On 3/8/06, Ron Piterman <[EMAIL PROTECTED]> wrote: > I have never done this, but I think this might work: > > Sam Gendler wrote: > > I need to keep track of the sum and count of various columns during > > the render of a table. Obviously, I can't use the paging > > functionality, so I could just render the table with a For component > > easily enough, but I'd rather stick with the table component if > > possible. Is there an easy way to cause the table compponent to call > > a method with the row object on each row, > > set the "row" parameter - this will call a property setter at the begin > of every iteration. do the calculations you need in this setter... > > and then inject an extra row > > into the model at the end? > > well, its a hack but just add a marked row to the end of the list, > detect it in the setter and fill it with the data you collected. > > To make its L&F different, use one of the row-class/column-class > parameters, bound to a property in your class. > the property should normally return a constant string. > > But, on the last row, (which you already detected above), it should > return some special class, which will L&F this row as your needs. > > Hope that works, > Ron > > > I can think of some hacky ways to do it > > with a custom iterator, but I'm wondering if there is a better way. > > > > --sam > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]