Hello,
I have my XML view that contains a button like this:
<Button
type="Transparent"
visible="{= ${$source>/text} !== 0}"
press="openSkillsDetails($event, ${dataModel>ID}, ${$source>/text})"
text="{
path: 'dataModel>ID',
formatter: '.getSkillsCount'
}"
/>
I created a button that will display as text the number of skills.
I want to hide this button when the number is 0. I need to access the button text post formatting to set if my button will be visible or not.
Inside Text formatter, only the context of the view is accessible (and i need the context of the view as i will do processing based on the view model).
I can't access the button id as the button is inside a table and generated inside each row.
The press function is working well and i can access $event and ${$source>/text} properly.
Inside visible $event or ${$source>/text}are not working.
If i try to use a formatter also for visible with input ${$source>/text}, the formatter is not called.
If someone can explain me what i am doing wrong ?
Using SAP UI 1.79.2 or 1.78.2.
Regards