Hi,
i'm trying to get the checkbox value for each row in a tableView.
TableView table = (TableView) this.getComponentByName("PORevTable");
if (table != null)
{
for (int i = 1; i <= table.getRowCount(); i++)
{
Checkbox chk = (Checkbox) this.getPageContext().getTableComponentForId("PORevTable","chkRev",i);
PortalRuntime.getLogger(IPortalConstants.IVIEW_LOGGER).info(null,chk.isChecked());
}
}
But the problem is that i am using a "disable" and "checked" checkbox (because user cannot uncheck what they already agreed).
My CellRenderer looks like this:
else if (column == 4)
{
Checkbox chk = new Checkbox("chkRev");
if (tableView.getValueAt(row, column).toString().equals("1"))
{
chk.setEnabled(false);
chk.setChecked(true);
}
else
{
chk.setChecked(false);
}
chk.render(rendererContext);
}
When i run it, i ALWAYS get a false value for the "disabled" checkbox.
I saw a method isEnable() for the Checkbox object but it always returns true.
Thanks you for your help,
Marjolaine