Hi primefaces experts,
this is my first try to develop a facelet incuding primefaces picklist component. I want to change captions of source and target list and i try to replace all buttons with my own graphics. Changing the captions was successful, but replacing the buttons failed.
Does anyone know a solution. I also searched the forum before starting this thread, but i could not find any similar problem.
Thanks,
Rüdiger
(PrimeFaces 3.0 M1 - Mojarra 2.0.3 - Tomcat 7.0 - Java 1.6 - Eclipse Helios)
This is the source of my xhtml-file
<?xml version="1.0" encoding="UTF-8"?>
<f:view xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:soka="http://java.sun.com/jsf/composite/sokabau"
xmlns:p="http://primefaces.prime.com.tr/ui">
<h:head>
<style type="text/css">
.ui-picklist-list {
width:550px !important;
height:300px !important;
}
</style>
</h:head>
<h:body>
<h:form id="form">
<p:pickList value="#{betriebsanmeldungBean.taetigkeiten}"
var="t1"
converter="#{taetigkeitConverter}"
itemLabel="#{t1.taetigkeitBezeichnung}"
itemValue="#{t1}">
<f:facet name="sourceCaption">Verfügbar</f:facet>
<f:facet name="targetCaption">Ausgewählt</f:facet>
<f:facet name="add"><p:graphicImage value="/img/weiter1.png" styleClass="pickListControl"/></f:facet>
<f:facet name="addAll"><p:graphicImage value="/img/weiter2.png" styleClass="pickListControl"/></f:facet>
<f:facet name="remove"><p:graphicImage value="/img/zurueck2.png" styleClass="pickListControl"/></f:facet>
<f:facet name="removeAll"><p:graphicImage value="/img/zurueck1.png" styleClass="pickListControl"/></f:facet>
</p:pickList>
</h:form>
</h:body>
</f:view>
Cannot change buttons of picklist !
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
See user's guide to figure out the css selectors of the source, caption and buttons. Then you can bring in your own css to override defaults.
Thanks for this advice. When i tried to use CSS, i only could change some properties like width and height of picklist component:
This works fine:
<style type="text/css">
.ui-picklist-list {
width:450px !important;
height:300px !important;
}
.ui-picklist-button {
width:120px !important;
}
.ui-picklist-button-add {
width:150px !important;
}
</style>
But i don't know how to change text of the button. Can you give me an example for this?
This works fine:
<style type="text/css">
.ui-picklist-list {
width:450px !important;
height:300px !important;
}
.ui-picklist-button {
width:120px !important;
}
.ui-picklist-button-add {
width:150px !important;
}
</style>
But i don't know how to change text of the button. Can you give me an example for this?
Rüdiger
PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14
PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
There are attributes for labs see user's guide page 293.
You have to apply them on picklist component itself.Check latest userguide for all attributes.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
-
- Posts: 42
- Joined: 12 Sep 2013, 15:34
Hi,
I'm trying to use this same approach to change the values of the buttons of the picklist. Is that possible? I know how to changes the titles, but I'm not sure if is possible to do this too.
I appreciate your help,
I'm trying to use this same approach to change the values of the buttons of the picklist. Is that possible? I know how to changes the titles, but I'm not sure if is possible to do this too.
I appreciate your help,
Primefaces 5.2
Apache Tomcat 7.0.34
NetBeans 7.3.1
Linux Ubuntu
Apache Tomcat 7.0.34
NetBeans 7.3.1
Linux Ubuntu
-
- Information
-
Who is online
Users browsing this forum: No registered users and 16 guests