I have a checkbox, and I would like to use the “checked state” logic to set a property in the parent data model. If I just give the component the property name in the field for “checked state”, I can set the value of my property by checking or unchecking the checkbox. That is normal/expected behavior, all good:
However, when I use Codeless logic in the “checked state” area to manipulate the state of my checkbox, it no longer binds to the property in my data model:
The checkbox displays as expected (according to the logic), but its state no longer databinds to the relevant property in my data model.
I would like to set/unset the value for the “intervalError” property in my data model using logic (logic which calculates a result based on the values of other properties in the data model). Is this not possible? How to accomplish this? This question/challenge is perhaps somewhat related to this discussion.
Using the DataBinding input is a shortcut of two handlers “On Change Event” and “Value Logic”, it means when you need an easy way to set up a bidirectional data biding you use the input.
However, when you are looking the more complex but more customizable way you need to add logic for both these handlers:
On Change event you check/validate/modify/etc data and then set it to any data model
Value/State Logic handler you get value from anywhere and then you can modify it before returning to the component UI
right, but the “on change” event is not triggered by changes in the value of the component (which occur via Value Logic). “On change” is only triggered by a user clicking on something… and if the component has “value Logic”, the user cannot actually interact with the component, it is “hard wired” to get its value from logic. Oh well, thought I would ask