Hi,
For a formItem, the data delivered by fetch as a JSArray. For an empty value, the fetch delivers as JSArray of size 0.
Problem: whenever the user just tabs in and out of this field, a ChangedEvent is fired, which I'm not expecting:
- The formItem has a setInputTransformer
After tab out, it kicks in.
It detects the new value == null. Since we don't want to change our underlying value, this returns again oldValue (which is the empty JSArray).
- The formItem has a setEditorValueFormatter.
This detects the empty JSArray size 0 value, and formats it into an empty string so the user sees nothing.
Am I still changing the internal value somewhere which makes the SmartClient framework triggers a ChangedEvent?
If I inspect the ChangeEvent, the oldValue and newValue are the same (value-wise, I don't know if JavaScript also has some kind of equals method to check if this is the same 'instance' as well?).
thanks,
dev mode, firefox 3.5.7, SC_SNAPSHOT-2011-04-22
For a formItem, the data delivered by fetch as a JSArray. For an empty value, the fetch delivers as JSArray of size 0.
Problem: whenever the user just tabs in and out of this field, a ChangedEvent is fired, which I'm not expecting:
- The formItem has a setInputTransformer
After tab out, it kicks in.
It detects the new value == null. Since we don't want to change our underlying value, this returns again oldValue (which is the empty JSArray).
- The formItem has a setEditorValueFormatter.
This detects the empty JSArray size 0 value, and formats it into an empty string so the user sees nothing.
Am I still changing the internal value somewhere which makes the SmartClient framework triggers a ChangedEvent?
If I inspect the ChangeEvent, the oldValue and newValue are the same (value-wise, I don't know if JavaScript also has some kind of equals method to check if this is the same 'instance' as well?).
thanks,
dev mode, firefox 3.5.7, SC_SNAPSHOT-2011-04-22
Comment