Question

I have simple treeTable. http://www.primefaces.org/showcase/ui/treeTable.jsf I want to change expand and collapse icon of this treeTable. How can I do that?

Was it helpful?

Solution

If you want to use custom icons (images), override the following CSS classes for their respective uses, on the treetable:

  • ui-icon : to customise the expanded-row state icon (the triangle)

     .ui-icon {
          width: 16px;
          height: 16px;
          background-image: url("/your-image-here");
      }
    
  • ui-icon-triangle-1-e ui-c : to customize the collapsed-row state icon

If you want to use more modern fontAwesome 'icons', see Change icon from jQuery UI to FontAwesome in PrimeFaces

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top