Migration from icefaces to primefaces 5.x ...Tab.setIcon

UI Components for JSF
Post Reply
allplan
Posts: 29
Joined: 15 Apr 2016, 13:39

03 May 2016, 15:15

Hello,

I need to migrate
setIcon("/images/search-18.png"); and
setLabel(" "); for org.primefaces.component.tabview.Tab
How shall I do it, please?

Thanks in advance.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

03 May 2016, 16:44

I don't know IceFaces, so just guessing...

- Label : see the docs, there is a 'title' attribute
- Icon: Search the internet: http://stackoverflow.com/questions/8977 ... tab-header

So if you want them combined, use the facet for title and icon and add the facet programmatically (is a generic jsf thing)

allplan
Posts: 29
Joined: 15 Apr 2016, 13:39

16 May 2016, 16:54

Hello, Is it possible to set an icon without defining a CSS class, please?

Thanks in advance.

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

31 May 2016, 09:47

Either you can use icon attribute(available for few components) or else use it as CSS style class
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

allplan
Posts: 29
Joined: 15 Apr 2016, 13:39

31 May 2016, 09:58

These icons are come from database during my web app initialization. I need different approach how to set them without defining them in CSS class before.

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

31 May 2016, 22:42

Why do you need it like that??? You seem to request a rarely used enhancement (you are the first) to a component which you can easily solve by a small amount of code (not even a workaround) on your side

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests