Cannot change buttons of picklist !

UI Components for JSF
RueKow
Posts: 331
Joined: 21 Jun 2011, 23:34
Location: Germany - Wiesbaden

23 Jun 2011, 23:03

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>
Rüdiger

PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14

RueKow
Posts: 331
Joined: 21 Jun 2011, 23:34
Location: Germany - Wiesbaden

18 Jul 2011, 16:36

:( no ideas ??? :(
Last edited by RueKow on 18 Jul 2011, 16:43, edited 1 time in total.
Rüdiger

PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

18 Jul 2011, 16:39

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.

RueKow
Posts: 331
Joined: 21 Jun 2011, 23:34
Location: Germany - Wiesbaden

19 Jul 2011, 08:40

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?
Rüdiger

PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

19 Jul 2011, 08:41

There are attributes for labs see user's guide page 293.

RueKow
Posts: 331
Joined: 21 Jun 2011, 23:34
Location: Germany - Wiesbaden

19 Jul 2011, 14:08

Now i'm using label attributes as described in users guide and ...
... it works fine ! (rtfm)

Many thanks to optimus.prime
Rüdiger

PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14

Jgomes
Posts: 125
Joined: 13 Oct 2011, 11:30

26 Jan 2015, 14:35

Currently in PRimeFces 5 where I can applay this atributte??
Primefaces 5.2/5.3
Mojarra 2.1.29
Jboss AS7-WildFly 8

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

27 Jan 2015, 07:56

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

Jgomes
Posts: 125
Joined: 13 Oct 2011, 11:30

28 Jan 2015, 09:16

In the last userguide the picklist doesn't have a label attributes
Primefaces 5.2/5.3
Mojarra 2.1.29
Jboss AS7-WildFly 8

warriorshadow
Posts: 42
Joined: 12 Sep 2013, 15:34

23 Apr 2015, 16:39

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,
Primefaces 5.2
Apache Tomcat 7.0.34
NetBeans 7.3.1
Linux Ubuntu

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 16 guests