I want to display an icon instead of a string or boolean inside a data table? Use case is as follows: the user wants to see an icon (e.g. a check or an x) depending on a value inside a business object. Anyone have any ideas?
How can I add an icon inside a brazos datatable
203 views Asked by Greg Harley At
1
Here's one approach:
Bind the value of the business object property to an output text that it’s inside the Data Table. In the configuration properties of the Output Text check the “Is HTML” option, then go to Advanced Options and put the name (say ‘getIconHTML’) of a java script function that will resolve and return the HTML of the icon. Then add a “Custom HTML” element to the Coach and a code similar to this:
Here we’re using font awesome icons, but could also use the decimal code of the HTML entities like ✘ (for the x) or ✔ for the checkmark.
Hope this helps!