Input control valueState with formatter issue
I have found some strange behaviour when using a formatter with the valueState attribute of the sap.m.Input control. Sample code can be found here.
I have tried this with the latest OpenUI5 and SAPUI5 libraries, i.e. 1.32.7.
In my sample I have a series of input fields that need to add up to 100. I want the valueState to be set to 'Error' when they sum is !== to 100 and to 'Success' when it is.
The initial rendering works fine - although it seems to call the formatter twice for each control.

When I update the fields the formatter is called many times more than expected and the valueState is not set even though the Text column shows that it is being returned correctly.

In my tests using a local version of Grahams plnkr I have found that substituting the lastest 1.32 for : https://openui5.hana.ondemand.com/1.30.11/resources/sap-ui-core.js or https://openui5.hana.ondemand.com/1.28.24/resources/sap-ui-core.js
both work as expected making two calls per update of a cell and correctly displaying the state of the box. This would narrow the fault down to 1.32.
Really strange... tracked by internal ticket 1570867530.
Thanks and regards Andreas
Hi,
we are still investigating the issue that the valueState update isn't reflected on the input control. But I would like to give you some update about how many times the valStateFormatter formatter is called:
- The formatter valStateFormatter is used twice in each row: on the 'text' property of the Text control and on the 'valueState' property of the Input control. Therefore it's called twice for the initial load of the page. For each of the binding it's only called once.
- When updating one of the number for the first time, the formatter is called a huge amount of times. This may be caused by the wrongly propagated value state and we will update here after the issue is fixed.
Best regards, Jiawei
Thanks Jiawei, to clarify what I was referring to when I said the initial page load seemed to call the formatter twice. In my example the formatter is used twice on each of three rows - so to my mind it should be called six times. But I can see it is called 12 times - in two separate groups of 6 calls.

Cheers Graham
I had to check this for because i found another wierd bug today and it seems that this issue has been fixed in 1.32.10
It does indeed seem to have been fixed