IDEMPIERE-3421 wtable dir editor load wrong list

This commit is contained in:
Carlos Ruiz 2017-07-04 12:42:55 +02:00
parent b0f7cda146
commit a2150cf29f
3 changed files with 9 additions and 17 deletions

View File

@ -744,10 +744,12 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
}
else
{
comp.dynamicDisplay();
boolean rw = mField.isEditable(true); // r/w - check Context
if (rw && !comp.isReadWrite()) // IDEMPIERE-3421 - if it was read-only the list can contain direct values
mField.refreshLookup();
comp.setReadWrite(rw);
comp.setMandatory(mField.isMandatory(true)); // check context
comp.dynamicDisplay();
}
}
else if (comp.isVisible())

View File

@ -996,9 +996,12 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
}
else
{
comp.dynamicDisplay();
boolean rw = mField.isEditableGrid(true); // r/w - check Context
boolean rw = mField.isEditable(true); // r/w - check Context
if (rw && !comp.isReadWrite()) // IDEMPIERE-3421 - if it was read-only the list can contain direct values
mField.refreshLookup();
comp.setReadWrite(rw);
comp.setMandatory(mField.isMandatory(true)); // check context
comp.dynamicDisplay();
}
Properties ctx = isDetailPane() ? new GridRowCtx(Env.getCtx(), gridTab, gridTab.getCurrentRow())

View File

@ -93,8 +93,6 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
private boolean readOnly;
private boolean updateable;
private String columnName;
protected WEditorPopupMenu popupMenu;
@ -177,7 +175,6 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
this.setMandatory(gridField.isMandatory(true));
this.readOnly = gridField.isReadOnly();
this.description = gridField.getDescription();
this.updateable = gridField.isUpdateable();
this.columnName = gridField.getColumnName();
this.strLabel = gridField.getHeader();
init();
@ -227,7 +224,6 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
this.setMandatory(mandatory);
this.readOnly = readonly;
this.description = description;
this.updateable = updateable;
this.strLabel = label;
init();
}
@ -253,7 +249,6 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
this.setMandatory(mandatory);
this.readOnly = readonly;
this.description = description;
this.updateable = updateable;
this.strLabel = label;
this.columnName = columnName;
init();
@ -277,15 +272,7 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
label.setMandatory(mandatory);
this.setMandatory (mandatory);
if (readOnly || !updateable)
{
this.setReadWrite(false);
}
else
{
this.setReadWrite(true);
}
this.setReadWrite(!readOnly);
((HtmlBasedComponent)component).setTooltiptext(description);
label.setTooltiptext(description);