Skip to Content
avatar image
Former Member

Need Help in binding Checbox select property to non Boolean values

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':' ')}" />
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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.

    Regards,

    Sharath

    Add comment
    10|10000 characters needed characters exceeded