If you put your images in the folder of resourcesyour project, you should access it as follows:
.ui-datatable .ui-row-toggler {
cursor: pointer;
background-image: url("../javax.faces.resource/expand.jpg.xhtml?ln=images/") ;
}
The magic formula should be
../javax.faces.resource/<file-name>.xhtml?ln=<path-to-the-folder>/
So, if your image is in /resources/car/bmw/series7.jpg, you should access it using../javax.faces.resource/series7.jpg.xhtml?ln=car/bmw/
source
share