How to change icon of TreeTable in Primefaces?

馋奶兔 提交于 2019-12-11 01:55:47

问题


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?


回答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



来源:https://stackoverflow.com/questions/23560234/how-to-change-icon-of-treetable-in-primefaces

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!