-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
:-)
I have one line more:
if (!Objects.equals(init, value)) { // different from original
if (init == null && StringUtils.isEmpty((String) value)) {
_dirtyFieldNames.remove(field);
return;
}
_dirtyFieldNames.add(field);
} else {
_dirtyFieldNames.remove(field);
}
2 | No.2 Revision |
:-)
I have one line more:
if (!Objects.equals(init, value)) { // different from original
if (init == null && StringUtils.isEmpty((String) value)) {
_dirtyFieldNames.remove(field);
return;
}
_dirtyFieldNames.add(field);
} else {
_dirtyFieldNames.remove(field);
}
So we cannot override the internal private variables we have copied the complete class FormImpl.java to an equal named package named org.zkoss.bind.impl in our project. Than making the modifications. This equal named class is prefered called by java because it's first in the project files searched.
3 | No.3 Revision |
:-)
I have one line more:
if (!Objects.equals(init, value)) { // different from original
if (init == null && StringUtils.isEmpty((String) value)) {
_dirtyFieldNames.remove(field);
return;
}
_dirtyFieldNames.add(field);
} else {
_dirtyFieldNames.remove(field);
}
So we cannot override the internal private variables we have copied the complete class FormImpl.java to an equal named package named org.zkoss.bind.impl in our project. Than making the modifications. This equal named class is prefered called by java because it's this class is searched at first in the project files searched.files.
4 | No.4 Revision |
:-)
I have one line more:
if (!Objects.equals(init, value)) { // different from original
if (value instanceof String) { // check for String
if (init == null && StringUtils.isEmpty((String) value)) {
_dirtyFieldNames.remove(field);
return;
}
}
_dirtyFieldNames.add(field);
} else {
_dirtyFieldNames.remove(field);
}
Edit: Check for String is needed.
So we cannot override the internal private variables we have copied the complete class FormImpl.java to an equal named package named org.zkoss.bind.impl in our project. Than making the modifications. This equal named class is prefered called by java because this class is searched at first in the project files.