IDEMPIERE-3179:record should move to editing mode when user is editing first field
just fire onChange for text conponent
This commit is contained in:
parent
5adb11ed1c
commit
ae3e003560
|
@ -180,6 +180,16 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
|
|||
init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Normal zk component just fire onChange event when user loss focus
|
||||
* call this method with true value let component fire event when user type first character
|
||||
* @param isChangeEventWhenEditing
|
||||
*/
|
||||
public void setChangeEventWhenEditing (boolean isChangeEventWhenEditing){
|
||||
this.component.setWidgetOverride("isChangeEventWhenEditing", String.valueOf(isChangeEventWhenEditing));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method is used to distinguish between 2 similar WSearchEditors
|
||||
*
|
||||
|
|
|
@ -120,6 +120,7 @@ public class WNumberEditor extends WEditor implements ContextMenuListener
|
|||
|
||||
private void init()
|
||||
{
|
||||
setChangeEventWhenEditing (true);
|
||||
if (gridField != null)
|
||||
{
|
||||
getComponent().setTooltiptext(gridField.getDescription());
|
||||
|
|
|
@ -32,11 +32,13 @@ public class WPasswordEditor extends WStringEditor
|
|||
{
|
||||
super(gridField);
|
||||
super.setTypePassword(true);
|
||||
setChangeEventWhenEditing (true);
|
||||
}
|
||||
|
||||
public WPasswordEditor(GridField gridField, boolean tableEditor)
|
||||
{
|
||||
super(gridField, tableEditor);
|
||||
super.setTypePassword(true);
|
||||
setChangeEventWhenEditing (false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,6 +117,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener
|
|||
|
||||
private void init(String obscureType)
|
||||
{
|
||||
setChangeEventWhenEditing (true);
|
||||
if (gridField != null)
|
||||
{
|
||||
getComponent().setMaxlength(gridField.getFieldLength());
|
||||
|
|
|
@ -57,7 +57,7 @@ Copyright (C) 2007 Ashley G Ramdass.
|
|||
zk.override(zul.inp.InputWidget.prototype, "doInput_", function (evt) {
|
||||
this.$doInput_(evt);
|
||||
|
||||
if (this.get ("isOnStardardWindow") == 'false'){
|
||||
if (this.get ("isOnStardardWindow") == 'false' || this.get ("isChangeEventWhenEditing") != true){
|
||||
return; // don't waste time to check component don't lay on standard window
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue