I have either a LIST or TABLE - and I want to conditionally show a button based on whether or not the current record is the first one - using a HTML calculation.
In the "old days" - you could just reference the controller.getSelectedIndex() and then if it was not the first row, then return some HTML, if it was - then return null.
However, since 7.x "tightened up" access to objects in the calc engine - it doesn't seem to work.
I'm looking to do something like this:
- Code: Select all
if(controller.getSelectedIndex() > 1) {
return '<html><head></head><body><img src="media:///cross-button.png" border="0" width="16" height="16"></body></html>'
} else {
return null;
}
I know that the onRender will work on formatting and the row/selected index color works in CSS... but this one has me at a loss.