Skip to Content
0
Oct 01, 2020 at 11:29 AM

How can I use bindProperty to set visible with expression bindig

125 Views Last edit Oct 01, 2020 at 11:30 AM 2 rev

Hello everybody,

I need to set the visible property with JavaScript. My problem is that I would like to use expression binding here but everything I tried so far did not work. I know the workaround with parts and a formatter, but I would like to avoid it.

Here is my code:

oButton.bindProperty(
  "visible",
  "{= ${viewModel>/showButton} === true && ${viewModel>/example} === true }"
);