Revision history [back]

click to hide/show revision 1
initial version

answered 2014-09-03 15:44:09 +0800

terrytornado gravatar image terrytornado flag of Germany

http://www.oxitec.de/

:-)

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);
    }

:-)

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.

:-)

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.

:-)

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.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More