IDEMPIERE-5581 : Dialog.askForInput : allow Integer (#1680)
* IDEMPIERE-5581 : Dialog.askForInput : allow Integer https://idempiere.atlassian.net/browse/IDEMPIERE-5581 * IDEMPIERE-5581 : Dialog.askForInput : allow Integer Add check on displaytype as suggested by @hengsin Co-Authored-By: hengsin <152246+hengsin@users.noreply.github.com> --------- Co-authored-by: hengsin <152246+hengsin@users.noreply.github.com>
This commit is contained in:
parent
e7b9b72582
commit
3e957e6c1f
|
@ -63,7 +63,16 @@ public class WNumberEditor extends WEditor implements ContextMenuListener
|
|||
|
||||
public WNumberEditor()
|
||||
{
|
||||
this("Number", false, false, true, DisplayType.Number, "");
|
||||
this(DisplayType.Number);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param displayType
|
||||
*/
|
||||
public WNumberEditor(int displayType)
|
||||
{
|
||||
this("Number", false, false, true, displayType, "");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -136,6 +145,10 @@ public class WNumberEditor extends WEditor implements ContextMenuListener
|
|||
{
|
||||
super(new NumberBox(displayType == DisplayType.Integer), columnName, title, null, mandatory,
|
||||
readonly, updateable);
|
||||
|
||||
if (!DisplayType.isNumeric(displayType))
|
||||
throw new IllegalArgumentException("DisplayType must be numeric");
|
||||
|
||||
this.displayType = displayType;
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -347,6 +347,8 @@ public final class Dialog {
|
|||
return new WStringEditor();
|
||||
case DisplayType.Number:
|
||||
return new WNumberEditor();
|
||||
case DisplayType.Integer:
|
||||
return new WNumberEditor(editorType);
|
||||
case DisplayType.TableDir:
|
||||
return new WTableDirEditor(lookup, "", "", true, false, true);
|
||||
case DisplayType.Search:
|
||||
|
|
Loading…
Reference in New Issue