Andres - 2007-09-11

Hi,
I have a html decorator that inserts an extra row before the row that Displaytag is processsing. The extra row is added in the startRow method of the decorator.

I want to do the same in an excel decorator but I noticed that the row is passed only in the FinishRow method. From the HssfTableWriter class:

protected void writeDecoratedRowFinish(TableModel model) throws Exception
{
    TableDecorator decorator =  model.getTableDecorator();
    if (decorator instanceof DecoratesHssf)
    {
        DecoratesHssf hdecorator = (DecoratesHssf) decorator;
        hdecorator.setSheet(this.sheet);
    }
    decorator.finishRow();
    this.rowNum = this.sheet.getLastRowNum();
    this.rowNum++;
}

Would be there a problem if I modify the code and call the setSheet routine in the writeDecoratedRowStart method?

Thanks in advance,

Andrés Chaves