The file name editor value is not save if user doesn't press enter at the text box after selected file using the browse for file button.
This commit is contained in:
parent
e2fa0f1fc4
commit
6b37fe8be3
|
@ -95,9 +95,23 @@ public class WFilenameEditor extends WEditor
|
||||||
|
|
||||||
public void onEvent(Event event)
|
public void onEvent(Event event)
|
||||||
{
|
{
|
||||||
|
String newValue = null;
|
||||||
|
|
||||||
if (Events.ON_CHANGE.equals(event.getName()) || Events.ON_OK.equals(event.getName()))
|
if (Events.ON_CHANGE.equals(event.getName()) || Events.ON_OK.equals(event.getName()))
|
||||||
{
|
{
|
||||||
String newValue = getComponent().getText();
|
newValue = getComponent().getText();
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (Events.ON_CLICK.equals(event.getName()))
|
||||||
|
{
|
||||||
|
cmd_file();
|
||||||
|
newValue = getComponent().getText();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
|
if (oldValue != null && newValue != null && oldValue.equals(newValue)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -107,11 +121,6 @@ public class WFilenameEditor extends WEditor
|
||||||
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
|
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
|
||||||
fireValueChange(changeEvent);
|
fireValueChange(changeEvent);
|
||||||
}
|
}
|
||||||
else if (Events.ON_CLICK.equals(event.getName()))
|
|
||||||
{
|
|
||||||
cmd_file();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load file
|
* Load file
|
||||||
|
|
Loading…
Reference in New Issue