Revision history [back]

Thanks Chill,

seems it's a problem in the FormImpl class. If a binded component have an intial value of NULL and we insert a few signs, jump to next field to evaluate the changes and than remove the inserted signs back than the state is dirty. the setField method evaluate the origin value 'NULL' is not '' (empty) and set the state to dirty.

public class FormImpl implements Form,FormExt,Serializable { ... public void setField(String field, Object value) { _fields.put(field, value); final Object init = _initFields.get(field); if (!Objects.equals(init, value)) { //different from original _dirtyFieldNames.add(field); } else { _dirtyFieldNames.remove(field); } }

Thanks Chill,

seems it's a problem in the FormImpl class. If a binded component have an intial value of NULL and we insert a few signs, jump to next field to evaluate the changes and than remove the inserted signs back than the state is dirty. the setField method evaluate the origin value 'NULL' is not '' (empty) and set the state to dirty.

public class FormImpl implements Form,FormExt,Serializable {
...
public void setField(String field, Object value) {
_fields.put(field, value);
final Object init = _initFields.get(field);
if (!Objects.equals(init, value)) { //different from original
} else {
_dirtyFieldNames.remove(field);
}
}}


Thanks Chill,

seems it's a problem in the FormImpl class. If a binded component have an intial value of NULL and we insert a few signs, jump to next field to evaluate the changes and than remove the inserted signs back than the state is dirty. because the setField method evaluate the origin value 'NULL' is not '' (empty) and set (empty). That's right but not in our sense. In the state to dirty.UI it looks equal if a textbox value is NULL or empty.

public class FormImpl implements Form,FormExt,Serializable {
...
public void setField(String field, Object value) {
_fields.put(field, value);
final Object init = _initFields.get(field);
if (!Objects.equals(init, value)) { //different from original