Hi,
<p:commandButton image="/resources/image/edit.png" type="image"/>
its not working and out put is
<button ....>
<span class="ui-button-icon-primary ui-icon /resources/image/edit.png"></span>
</button>
primefaces 2.2.M1 <p:commandButton image not work
the image-attribute is a css-class selector.
use it as:
use it as:
Code: Select all
.image {
background: url(/resources/image/edit.png) no-repeat top left;
}
<p:commandButton image="image" type="button"/>
JSF-2.0, mojarra-2.0.2-FCS and PrimeFaces-2.1 on GlassFish v3.0.1 (build 22)
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Every project usually has a main css for these so should not be an issue as it is reusable. This is much better than defining an image path for each button, what if the image changes? With css, it is centralized and controlled from one place.
Also you can create composite components like with JSF 2.0.
That handles and label stuff.
Also you can create composite components like with JSF 2.0.
Code: Select all
<yourtag:saveButton />
Hi
I'm code
This code not work.
I'm code
Code: Select all
<style type="text/css">
.image {
background: url(/images/add.png) no-repeat top left;
}
...
<p:commandButton id="ekle" image="image" action="#{servisAdd.islemEkle}" title="İşlem ekle" update="bilesen11,islemListesi"/>
</style>
I have the same Problem.
I put the image attribute in my CSS file, the image doesn't show up!
The original settings are still active for the button:
I put the image attribute in my CSS file, the image doesn't show up!
The original settings are still active for the button:
Code: Select all
background: url("/beta/javax.faces.resource/themes/sam/images/ui-default.png.jsf?ln=primefaces") repeat-x scroll 0 0 #D8D8D8
-
- Information
-
Who is online
Users browsing this forum: No registered users and 50 guests