Hi,
I have a timeline with the group "Rooms" and I need to change the background color of each "Room" depending on the % of ocupation.
Room 1 - 40% (background-color: yellow)
Room 2 - 85% (background-color: red)
Room 3 - 10% (background-color: green)
Is there a way to do it?
Thanks in advance.
Change group style
What is the problem? You can use
You model class Room should provide a method getColor() which returns a color as String depending on % of ocupation.
Code: Select all
<f:facet name="group">
<h:panelGroup style="background-color: #{room.color}">
#{room.name}
<h:panelGroup>
</f:facet>
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Posts: 214
- Joined: 29 Nov 2011, 00:40
I am struggling to get this going under PF 10.
Has anything changed?
Code: Select all
<f:facet name="group">
<h:panelGroup style="background-color: red !important" styleClass="#{xxxController.getGroupStyle(group)}" >
<h:outputText value="#{group}"/>
</h:panelGroup>
</f:facet>
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:
Dont forget the classifier:
Code: Select all
...primefaces
<classifier>jakarta</classifier>
... theme
<classifier>jakarta</classifier>
-
- Posts: 214
- Joined: 29 Nov 2011, 00:40
Prime Icons also do not show up when used inside the Timeline (groups or the text area)
X<i class="pi pi-file"></i>X
the "X's show up; but not the prime icon
elsewhere on the page I am using prime icons and they show up...
X<i class="pi pi-file"></i>X
the "X's show up; but not the prime icon
elsewhere on the page I am using prime icons and they show up...
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:
Dont forget the classifier:
Code: Select all
...primefaces
<classifier>jakarta</classifier>
... theme
<classifier>jakarta</classifier>
-
- Posts: 214
- Joined: 29 Nov 2011, 00:40
I noticed this is "extensions"... but I am using the Timeline supplied in PF10.
Just saying.
Just saying.
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:
Dont forget the classifier:
Code: Select all
...primefaces
<classifier>jakarta</classifier>
... theme
<classifier>jakarta</classifier>
-
- Posts: 214
- Joined: 29 Nov 2011, 00:40
PF12+, Quarkus 3.2+ (CDI, JPA etc.), JSF Bridge (MyFaces 4.0.1)
Dont forget the classifier:
Dont forget the classifier:
Code: Select all
...primefaces
<classifier>jakarta</classifier>
... theme
<classifier>jakarta</classifier>
Yep I had to fix that cause they turned XSS protection on. Its fixed in 10.0.2.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests