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?
Asked
Active
Viewed 4,574 times
2
-
1See [primefaces tree arrow icon change to font awesome arrow](http://stackoverflow.com/a/43535738/880619) – Jasper de Vries Apr 21 '17 at 07:48
-
1and [`FontAwesomeResourceHandler`](https://github.com/jepsar/Jepsar-PrimeFaces-Theme#fontawesomeresourcehandler) – Jasper de Vries Apr 21 '17 at 08:06
1 Answers
1
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