I was trying to display an icon for the button in the same way
as i see it in the example.
My xhtml page is this:
Code: Select all
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:f="http://java.sun.com/jsf/core">
<f:view>
<h:head>
<title>Facelet Title</title>
<style type="text/css">
.deleteIcon {
background: url(#{request.contextPath}/images/delete.png) no-repeat;
}
</style>
</h:head>
<h:body>
<h:form>
<p:graphicImage value="/images/delete.png" />
<p:commandButton value="test" image="deleteIcon" title="" >
</p:commandButton>
<h:button styleClass="deleteIcon" />
</h:form>
</h:body>
</f:view>
</html>
Can anybody help ?