From f3403b3130ef3e0c17de7eb3f507674cf357c0f7 Mon Sep 17 00:00:00 2001 From: Silvano Trinchero Date: Mon, 17 Sep 2018 16:34:04 +0200 Subject: [PATCH] Fix isCellEditable --- .../adempiere/webui/component/WListbox.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListbox.java index f442ceb2a2..0fa2bea022 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/WListbox.java @@ -198,25 +198,24 @@ 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) + // F3P: If allowed, use idcolumn as a switch for read/write (Some logic as boolean) + + if(allowIDColumnForReadWrite + && column != 0 + && val instanceof IDColumn + && ((IDColumn)val).isSelected() == false) { - IDColumn idc = (IDColumn)val; - - if(!idc.isSelected()) - return false; + return false; } // is the column read/write?