1
votes
<i class="fa-trash-o fa" /> ( from http://fortawesome.github.io/Font-Awesome/icons/ )

I want the above class to be the result for a column icon:

<xp:this.iconSrc><![CDATA[#{javascript:var class = "fa-trash-o fa";
if (rowData.isDocument() && rowData.getDocument()!= null) {
var formName = rowData.getDocument().getItemValueString("Form");

if ( formName == "Aform") {

// How can I reffer to the class? => The icon from the class will be shown. } 

]]></xp:this.iconSrc>
1

1 Answers

5
votes

You then shouldn't use the iconSrc / view icon setting of the column. Instead you have to compute your own HTML as a value in that column and set the FA-class depending on your column value(s). Make sure you set the content type for the column to "HTML" and not "Text".