Fix isCellEditable

This commit is contained in:
Silvano Trinchero 2018-09-17 16:34:04 +02:00
parent 2ac37db0ad
commit f3403b3130
1 changed files with 10 additions and 11 deletions

View File

@ -198,24 +198,23 @@ public class WListbox extends Listbox implements IMiniTable, TableValueChangeLis
{
// if the first column holds a boolean and it is false, it is not editable
// F3P: If allowed, use idcolumn as a switch for read/write
if (column != 0)
return false;
Object val = getValueAt(row, 0);
if ((val instanceof Boolean)
// if the first column holds a boolean and it is false, it is not editable
if (column != 0
&& (val instanceof Boolean)
&& !((Boolean)val).booleanValue())
{
return false;
}
if(val instanceof IDColumn)
{
IDColumn idc = (IDColumn)val;
// F3P: If allowed, use idcolumn as a switch for read/write (Some logic as boolean)
if(!idc.isSelected())
if(allowIDColumnForReadWrite
&& column != 0
&& val instanceof IDColumn
&& ((IDColumn)val).isSelected() == false)
{
return false;
}