Setting a Read-Only TextField's value causes the binder to report with hasC

My form has a few “normal” entry fields, selections, etc plus a few fields that are computed, i.e. these are marked as ReadOnly (using the setReadOnly()-method) plus the binder’s setter is defined as null.

Nevertheless, when I programmatically set the bean’s value (which causes the TextField’s content to update accordingly) the binder will report as having changes (i.e. hasChanges() yields true). IMHO this is a bug!
Can I prevent that somehow or make the binder ignore that field for it’s hasChanges()-computation?
I only want to see changes here that were done via the UI!

As I already described elsewhere I am using the result of hasChanges() to ask the user whether he/she wants to save changes before leaving that page. However, with these read-only TextFields I now ALWAYS have changes even if the user changed nothing. :frowning:

Hi Michael,

One option might be to do your own change listener and observe the isFromClient flag. If its false, it means that the value was set in code and not coming from the client.

Hope this helps,

Martin