I am using the latest version of displaytag on a linux system with java 1.5.
I am trying to use the "_rowNum" attribute in my column decorators but am failing to get the expected result. The table contains 5 rows but every time I do the following (in my column decorator):
I keep getting the last row (in other words 5). I was under the impression that a decorator was called when the row was actually rendered; in which case, the numbering should work properly. Can anyone shed light on what might be going on?
Thanks.
Aladin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am using the latest version of displaytag on a linux system with java 1.5.
I am trying to use the "_rowNum" attribute in my column decorators but am failing to get the expected result. The table contains 5 rows but every time I do the following (in my column decorator):
Object rowNumber = pageContext.findAttribute("table_rowNum");
I keep getting the last row (in other words 5). I was under the impression that a decorator was called when the row was actually rendered; in which case, the numbering should work properly. Can anyone shed light on what might be going on?
Thanks.
Aladin
Problem solved:
"[Column Decorators] have actually no access to the page context or other properties" (from the docs)
To clarify... I am using DisplaytagColumnDecorator not the depracated ColumnDecorator.