I have tried following the solution for issue 3200 and it will not work for me. I don't get the image to display!
Here is my CSS:
Code: Select all
barca {
background: url(/images/ge-logo.jpg) no-repeat !important;
height: 25px;
width: 25px;
}
And here is my menuitem:
Code: Select all
<p:menuitem icon="barca" url="http://www.ge.com"/>
Also, your documentation is wrong!
This is what is included in page 272:
There are two ways to specify an icon of a menuitem, you can either use bundled icons within
PrimeFaces or provide your own via css.
ThemeRoller Icons
Code: Select all
<p:menuitem icon="ui-icon-disk" ... />
Code: Select all
<p:menuitem icon="barca" ... />
.barca {
background: url(barca_logo.png) no-repeat;
height:16px;
width:16px;
}
So, the doc. doesn't even show the !important; at the end of the example, but even after adding that and spending about 5 hours on this fighting the framework and trying everything I could think of I could not get my icon to display.
Is there a bug in the code? BTW, I am using yesterday's download of PF 3.3.1
BTW, when I go to this URL in the browser, to verify the image is there, that works so I know it is not related to a missing image:
http://localhost:8080/webui/images/ge-logo.jpg
Also, I have tried multiple combinations for the image path from the page where I have the CSS and menuitem.
I have tried this so far and none of them work!
/images/ge-logo.jpg
../images/ge-logo.jpg
../../images/ge-logo.jpg
Issue 3200 used /images/imageName but in my case my xhtml page which includes the CSS and menuitem is located under pages so I think the path may have to be ../../images/ge-logo.jpg but that doesn't work also.
I think you guys have a bug in the code or the doc. Either way please let me know if and how it can be resolved. The whole reason I am trying to do this is because I want to include a Logo on the top left of my menubar and I also could not find a way to do that so I ended going with the menuitem with custom icon approach but that doesn't work also.