Skip to Content

Need Help in binding Checbox select property to non Boolean values

Aug 02, 2017 at 08:16 AM


avatar image

Hi All,

I am having a table in for one coloumn i am using checkbox. From backend I am getting values as "X" and " ".

Now my problem is how do I bind the selected Value of checkbox . Whenever i am deselecting it returns false .

However each time i am deseleccting its not returning " " just returns false value.

I tried <CheckBox selected="{= (${bNotRelevant} === 'X' ? 'X':' ')}" />
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sharath M G Aug 02, 2017 at 08:39 AM

Convert from false to " " using a formatter function. Else, invoke a function where simply map false to " " and true to "X".

You can call this function in the event "select" of the checkbox. So, on select, call the function where if checked make it "X" and if unchecked make it " ". Save it to the variable or json model.



10 |10000 characters needed characters left characters exceeded