I have a dataGrid component and every grid contains a panel component, thus there are many panels in a page.
Every panel contains data of either a female or a male.
I like female panel has pink title bar and male panel has gray title bar.
How can I achieve this?
(I know I can use ui-panel-titlebar CSS class to style all panels with the same style, but my requirement is female panels should be pink and male panels should be gray)
Programmatically style panel component in dataGrid
-
- Posts: 51
- Joined: 06 Sep 2010, 23:01
- Location: São Paulo - Brazil
Hi miss_duke,
I don't know what css properties of the datagrid can be changed, but there is the styleClass of the datagrid that you could try something like this:
<p:dataGrid styleClass="#{yourBean.male ? 'maleCssClass' : 'femaleCssClass' }" >
</p:dataGrid>
I hope this help you.
I don't know what css properties of the datagrid can be changed, but there is the styleClass of the datagrid that you could try something like this:
<p:dataGrid styleClass="#{yourBean.male ? 'maleCssClass' : 'femaleCssClass' }" >
</p:dataGrid>
I hope this help you.
Mojarra 2.0.2 (FCS b10)
GlassFish 3.0.1
PrimeFaces 2.2.1
GlassFish 3.0.1
PrimeFaces 2.2.1
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Glad to hear.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 38 guests