Fix zkwebui problem with mandatory read-only fields.
There is a case where a read-only field is set as mandatory (it's filled with a default value) - this is working ok in swing, but in zkwebui was not working because read-only fields were treated in a different way ---------------------- Fix problem caused by revision 14423: http://adempiere.svn.sourceforge.net/viewvc/adempiere?view=revision&revision=14423 Problem reported here: https://sourceforge.net/projects/adempiere/forums/forum/610548/topic/3958171 * Fix zkwebui problem with mandatory read-only fields. * Now it behaves like swing * And lists are not filled for read-only fields (better performance)
This commit is contained in:
parent
6576167196
commit
6b9b4814e7
|
@ -432,7 +432,7 @@ public abstract class WEditor implements EventListener, PropertyChangeListener
|
|||
{
|
||||
this.mandatory = mandatory;
|
||||
if (label != null)
|
||||
label.setMandatory(mandatory && isReadWrite());
|
||||
label.setMandatory(mandatory);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -197,7 +197,7 @@ ContextMenuListener, IZoomableEditor
|
|||
//still not in list, reset to zero
|
||||
if (!getComponent().isSelected(value))
|
||||
{
|
||||
if (value instanceof Integer && (Integer)value == 0)
|
||||
if (value instanceof Integer && gridField.getDisplayType() != DisplayType.ID) // for IDs is ok to be out of the list
|
||||
{
|
||||
getComponent().setValue(null);
|
||||
if (curValue == null)
|
||||
|
|
Loading…
Reference in New Issue