Primefaces newbie question of skinning component?

UI Components for JSF
Post Reply
salman4u
Posts: 78
Joined: 24 Jan 2010, 10:28

06 Feb 2010, 13:03

Hello,
i downloaded one manual and it has different different css classes to be used for different component like for panel it has

Code: Select all

 .pf-panel, .pf-panel-hd, .pf-panel-bd, .pf-panel-ft {
	     border-color:#99FF00;
}	    	
.pf-panel-hd {
	     background: url(../images/head_green.png);
}	
.pf-panel-bd {
	     background: #FFFFCC;
}	
.pf-panel-toggler-expanded, .pf-panel-toggler-collapsed{
	     top:3px;
	     width:16px;
	     height:16px;
}	    	
.pf-panel-toggler-expanded {
	     background: url(../images/toggle_green_expanded.png) no-repeat;
}	    	
.pf-panel-toggler-collapsed {
	     background: url(../images/toggle_green_collapsed.png) no-repeat;
}

Are these classes fixed? means we need to use this kind of strange names only? If yes, how can we remember this kind of strange classes name? all dots and dashes and pf? :shock:. Furthermore, this is for panel and there are hundreds of them if you sum up all compoenent. How to remember this? Is there any trick?

Also i used panel and gave it's classStyle="pf-panel", but it's not working? How do i use these classes? Please Help geeks!

Thanks in advance :)

salman4u
Posts: 78
Joined: 24 Jan 2010, 10:28

06 Feb 2010, 14:45

Please reply somebody? If not to my first question atleast tell me why does the skinning not work? when i copy paste the above css?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Feb 2010, 14:55

I've checked the documentation and it is same as the ones in example;

http://www.primefaces.org:8080/prime-sh ... dPanel.jsf

The strange names are CSS style selectors.

Maybe you've placed them before p:resources?

Also please see forum posting guidelines, especiall number 3. http://primefaces.prime.com.tr/forum/vi ... f=3&t=1194

salman4u
Posts: 78
Joined: 24 Jan 2010, 10:28

06 Feb 2010, 15:00

oops! sorry cagatay.civici. Will be careful next time. Actually i am literally in love with Primefaces :p and so i got desperate because you replied to my webparts questions but didn't reply to this. Anyways, will be careful next time.

And thanks man thanks. You are great. WIthout providing you any kind of code still you got it right. I actually placed my stylesheet file before resources.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

06 Feb 2010, 15:07

Glad it works. ;)

makoto1337
Posts: 82
Joined: 10 Dec 2009, 10:17

08 Feb 2010, 07:11

Wait, do we still need p:resources if using the latest nightly build of PF 2?
Primefaces 3.3
GlassFish 3.1.2
JSF 2
Java 6

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

08 Feb 2010, 14:44

For PF-2.0.0-SNAPSHOT nightly, no, as resources are auto placed within h:head. p:resources is deprecated in JSF2-PF2.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests