I am developing a custom widget allowing to print an infotable. The infotable has a property DataToPrint with the following attributes:
'description': 'Data to be formatted to print inside a grid',
I would like to check the datashape of the property when binding it. The datashape must be two string fields "name" and "value". If the data bound do not correspond to this datashape, I want to reset the binding.
I tried to use the afterAddBindingSource(bindingInfo) function to perform the test. The binding info parameter contains one field "targetProperty" indicating the propertyName that was just bound. I get the right name, however, when trying to get the property value with this.getInfotableMetadataForProperty('DataToPrint') I get an empty object. I assume the property is only updated after the function call.
Does someone have an idea on how to make this verification?