primefaces

Add an image or icon to primefaces tab header

梦想与她 提交于 2019-12-30 05:46:06
问题 im trying to use an image /icon on a tab header instead of text title(or may using both of them), i was testing using titleStyleClass seting an image background but doesnt work my primefaces tab: <p:tab titleStyleClass="tCliente" title="Vehiculo"> My css style .tCliente { background-image: url(../images/logo_tropidatos.gif); } Thanks for your help :D 回答1: On PrimeFaces 3.0 and newer you can add a facet to override title on tabs: <p:tabView> <p:tab> <!-- overrides title on tab--> <f:facet name

Access JSF and Primefaces version numbers programmatically

你离开我真会死。 提交于 2019-12-30 05:00:34
问题 I use PrimeFaces 3.5.x and Mojarra JSF 2.1.x I would like to access and show the versions of both libraries programmatically. I use the versions as maven2 properties, but I hope there is an easier way to get the versions. I hope to find something like: Primeface.getVersion(); FacesContext.getCurrentInstance(); A JavaScript based solution would be fine too, since I only want to display the version on a status page. 回答1: For JSF: //returns the major version (2.1) FacesContext.class.getPackage()

JSF show icon without Button

送分小仙女□ 提交于 2019-12-30 04:51:08
问题 Hi guys I want to show the icons without buttons but it doesn't work. I get the following message: no Mime-Type was Found. The two icons are default icons from Primefaces. I use JSF 2.1 and primefaces 3.5 <h:graphicImage rendered="#{!task.IS_SEEN}" name="ui-icon-mail-closed"/> <h:graphicImage rendered="#{task.IS_SEEN}" name="ui-icon-mail-closed"/> If i use buttons it would work or can I set that the button can not be pressed <p:commandButton rendered="#{!task.IS_SEEN}" icon="ui-icon-mail

primefaces global filter without the column filters

限于喜欢 提交于 2019-12-30 04:01:04
问题 I'm working on the example mentioned in primefaces showcase. I am trying to create a global filter for the datatable. Currently the table looks like this: What I want to do is remove the individual column filters and have only the global filter. Like this: To do that I remove the filterBy attribute on the column definitions. But on doing that, I get a javascript warning - Error in parsing value for filter , declaration dropped and the global filter doesn't work. Could someone please tell me

Is primefaces live scrolling compatible with Lazy loading

[亡魂溺海] 提交于 2019-12-30 03:32:07
问题 I have a datatable where huge data sets need to be displayed.So i decided to go with primefaces live scrolling.I also got to know that to improve datatable performance with huge data sets we need to implement lazy loading.With reference to the primefaces showcase example here,what i observed that there in the statement , a LazyDataModel needs to be implemented to query the datasource when pagination, sorting, filtering or live scrolling happens live scrolling is mentioned but i cannot see the

p:dialog form submit loses action method after RequestContext update

允我心安 提交于 2019-12-29 09:57:20
问题 I have a small form inside my p:dialog : <p:dialog id="commentDialog" header="#{managedBean.dialogHeader}" widgetVar="commentDialog" modal="true" resizable="true" height="auto"> <h:form> <h:outputLabel for="comment" value="Comment:"/> <p:inputTextarea id="comment" title="Comment" rows="6" cols="33" value="#{managedBean.comment}" required="true"/> <h:commandButton value="Submit" action="#{managedBean.dialogFormSubmit}"/> </h:form> </p:dialog> Can you tell why, when I hit the Submit button, the

PrimeFaces dataTable sorting not working

不羁的心 提交于 2019-12-29 09:09:21
问题 I am having trouble getting the PrimeFaces dataTable component's sort behavior to work as documented. (I am using PrimFaces 4.0, JSF 2.1.12, and Tomcat 7.0.) The problem I am seeing doesn't correspond to any of the other problem reports/discussions related to PF dataTable, as far as I can tell. To explore the problem I created an example based closely on the ShowCase example of using a sorted dataTable, copying the ShowCase source code for the tableBean backing bean (including the generation

PrimeFaces dataTable sorting not working

牧云@^-^@ 提交于 2019-12-29 09:09:02
问题 I am having trouble getting the PrimeFaces dataTable component's sort behavior to work as documented. (I am using PrimFaces 4.0, JSF 2.1.12, and Tomcat 7.0.) The problem I am seeing doesn't correspond to any of the other problem reports/discussions related to PF dataTable, as far as I can tell. To explore the problem I created an example based closely on the ShowCase example of using a sorted dataTable, copying the ShowCase source code for the tableBean backing bean (including the generation

How to change PrimeFaces submenu default icons

只愿长相守 提交于 2019-12-29 09:08:32
问题 What is the method of adding my own custom icons to the submenu name area in a panelMenu in PF 3.5? This is the example given on the official documentation web page: I have to remove the small arrows and replace them with other images. So far, I have understood that the arrows are placed by the primefaces.js (which comes in the PF JAR file). What is the method of replacing them through java? As I am generating a dynamic menu, not a static one. I would like something like this: I have tried

How to make p:graphicImage clickable and invoke bean action

浪尽此生 提交于 2019-12-29 08:48:07
问题 I am using <p:graphicImage> like below: <div id="mapp"> <h3>Country Map</h3> <p:graphicImage id="city" value="#{countryPages_Setup.countryMap}" width="250" height="190"> </p:graphicImage> </div> But this is not a clickable image. How can I make this image clickable so when user click on it, I can invoke the managed bean action that I want. 回答1: Wrap your image in a h:commandLink / h:link : <h:commandLink action="..."> <p:graphicImage id="city" value="#{countryPages_Setup.countryMap}" width=