primefaces global filter with commandlink

Okay. So I'm trying to implement a global filter using commandLinks. The idea is to have an alphabet of commandLinks, which a user can then use instead of typing a letter. So far, I've got filtering working on the column (will add the filterStyle none once the commandLinks are working). Using chromes debug tool (ctrl-shift+i), and clicking on the command link, i can see the datatable refresh the list. However, it doesn't filter anything. I've been using primefaces showcase, and this sta

Primefaces datatable reset pagination

I am using the dataTable component with the paginator in a search utility which works great but having a problem to reset paginator page to the first page. for example you are on page 6 of the paginator and you perform a new search, the dataTable gets reloaded with the new data but, the page number is not reset to 1 it remains on 6. I'm using PF 3.4.2. any idea?

Unable to inject EJB in PrimeFaces LazyDataModel

I'm trying to use the primefaces LazyDataModel for a tabelaric view in JSF, the problem is that I'm unable to inject anything into the class. I always get null fot the injected object. For example I'm injecting @PersistenceContext(unitName = "domainDS") private EntityManager em; or an EJB @EJB OrganizationHandler orgHandler; but I get null for both of them. The whole lazy datamodel class import; import java.util.List; import java.util.Map; import javax.ejb.EJB;

PrimeFaces 5.0 Calendar in Portlet on WebSphere Portal 8.5 NullPointerException

I'm trying to deploy a simple Portlet with a PrimeFaces 5.0 Calendar on IBM WebSphere Portal 8.5. It works, but doesn't show the arrows on the calendar and I'm getting a NullPointerException in my WAS Console. JSF-Portlet-Code: <!-- jsf:pagecode language="java" location="/src/pagecode/" --><!-- /jsf:pagecode --> <div xmlns:ui="" xmlns:f="" xmlns:h="" xmlns:port

PrimeFaces growl change color dynamically

Is there a way to change dynamically the background of the PrimeFaces growl component? I want to be able to show a red background when it's an error and a green background when is a success. Thanks in advance.

Primefaces How to include same xhtml twice in the same xhtml

Primefaces : 4.0 All the managed beans are in view scope. I need to include the same XHTML twice or more in a parent XHTML. Both the instances of the included xhtmls refer to the same instance of the bean. As per my understanding, the beans are singleton. So, both the included xhtmls get the reference of the same instance of the bean. How can I include the same xhtml more than once on the same page such that they refer to different instances of the same managed bean ?

How to toggle multiple panels from PrimeFaces?

I have a Datagrid, which is created dynamically and has 1 panel in each row. I set a widgetVar to my Panel to toggle all panels with a commandLink like this: <p:panel style="text-align:center;" id="horizontalPanel" toggleable="true" collapsed="true" toggleOrientation="horizontal" name="panelForComments" widgetVar="panel"> <p:ajax event="toggle" listener="#{panelView.onToggle}" /> <h:panelGrid columns="1" style="width:100%" cellpadding="10">

Is Primefaces Wizard lazy loaded

Is p:wizard lazy loaded or are all tabs loaded the first time the view is loaded? I have a page that is slow to load and am looking at optimizing it, but cannot find any information on this particular behavior of the wizard component

Primefaces Get p:selectOneRadio value to a JS function

I have a PF's selectOneRadio to choose a file type to download. Also I have a commandButton to call a download servlet using onclick attribute. The problem is that when I choose file type and click the button, the chosen value is of course not yet submitted. I'm looking for some way to get the chosen value available when I click on a download button. Here's my code: <p:selectOneRadio id="sorType" value="#{bean.type}" layout="custom"> <f:selectItem itemLabel="XML" itemValue="XML"

Update datatable primefaces

I am making an application which consisting of a task manager. In this task manager there are 3 list (inbox, today and week) in the inbox list only appear task without category and in the other two appear task with or without category for today and for the week respectively. I want to be able to change the category of one task in the three list. So if I change the category of an inbox task (that should not have category) the whole table should be updated and the task should be removed from th

Primefaces Need help understanding <p:inputNumber/> with <p:ajax/>

I have a Primefaces question that I am having a lot of trouble finding a solution. I have search the Primefaces documentation with no luck. We are using Primefaces 6.0 I have two <p:inputNumber/> and I want to sum the value of both of them and display in real-time on the screen while the user is typing. My ajax call inside each inputNumber is : <p:ajax update="totalcount" listener="#{myBean.updateTotalCount()}"/> everything almost works as expected. However totalcount is only u

Primefaces event.getFile().getContents() to be null

I am using PrimeFaces 5.1 in my project Fileupload event to getContents to be null. web.xml <filter> <filter-name>PrimeFaces FileUpload Filter</filter-name> <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class> </filter> <filter-mapping> <filter-name>PrimeFaces FileUpload Filter</filter-name> <servlet-name>Faces Servlet</servlet-name> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD<

Primefaces Datatable issues when presenting dynamic columns

I've got a NULLPointerException. I have iplemented an object called Workhours, which has list of Hours and a workday (enum value). Now, I have a list I would like to present it in a datatable with the workday (enum) name as a row, and the hours as columns. Now, this is what I tried: <p:dataTable id="dtWorkHours" var="workhour" value="#{uploadImagesPage.lwh}" > <p:column> <f:facet name="header">

Primefaces menubar menuitem Width

I am having trouble with the menuitem :( Wanted to include a pic, but wasnt allowed So question is stupid without it I can't seem to change the width of the drop down menu, I have included a style in my head and a width attrib in each menuitem, but they have made no difference: <style> ui-menu .ui-menu-parent .ui-menu-child { width: 400px; /* exagerated !! */ } </style> When the menu item is higlighted, the selection bar is the correct width ! Any Clues ???, here is an exa

Primefaces Delete & Confirm Dialog inside table column - Update or Freeze Issue

I have a smiliar problem like here: Primefaces: commandButton in confirmDialog cannot update datatable in the same form I have a table with games. In the last column there are 2 buttons: delete and details. The delete button should delete the game The button does delete the game but the update doesn't work. update=":form1:overviewTableGame" --> no reaction (no refresh) update="@form" --> update performes (table refreshes), but the entire scren is locked. i think due to the fact, that the fo

primefaces mobile autocomplete

I am trying to implement autocomplete in primefaces mobile. I've made the test for primefaces, it works fine, under hypothesis autocompletion in primefaces mobile has the same underlying principals as that of primefaces, here's the code that should do the trick : <h:form> <p:autoComplete completeMethod="#{someBean.complete}"/> </h:form> I am using primefaces mobile 0.9.4, in the mobile showcases they have PrimeFacesMobile-0.9.5-SNAPSHOT (which I can't download from

Primefaces EclipseLink NullPointerException from CriteriaBuilder

I'm using PrimeFaces datatable to load data from my database with LazyDataModel. This has been working perfectly. But recently i encountered a strange problem when i altered the code a little bit. And i assume this has nothing to do with JSF/PrimeFaces. The problem is that whenever i use filterCondition = cb.or(filterCondition,, value))in the getFilterCondition() method, i get the exception displayed at the bottom. However, whenever i use and() instead of or(), everyhing works per

Primefaces Disable p:datatable with javascript

I want to disable a primefaces dataTable to avoid that a new row can be selected (but a prior selected row shall be displayed). Is this possible? The dataTable is inside a modal p:dialog. I tried it with p:spotlight but it seems like that p:spotlight is not working inside a modal p:dialog. Is there another possibilty? With or without javascript?

PrimeFaces SelectOneMenu doesnt accept duplicate keys

I am migrating data and have some duplicate keys in the list. The drop down seems to overwrite old key values with the newly found key value. example id name 2 United States of America 69 United States of America i will only get the second one in the drop down menu. is it possible to make the menu accept duplicates?

Primefaces p:dataExporter in HTML Format is not working

As Per My Requirement HTML DataExporter need in primefaces Datatable. Is There any Possible way data exporting in html format. Please Suggest Any solution. <h:commandLink> <p:graphicImage value="resources/images/pdf.png" /> <p:dataExporter type="html" target="tbl" fileName="aaaaa" /> </h:commandLink>

PrimeFaces push and EventBus problems

I have problems using primefaces push notification system: -When i switched from pf 4.0 to 6.0/6.0.1/6.0.2 + atmosphere 2.4.3, my pushContext.push became deprecated and i experienced problem that facesmessage that i send are received as null on end point. (My preffered solution would be to get this to work) -After that i tried using EventBus and method EventBusFactory.getDefault().eventBus(); always returns null. I tried the same example as on showcase. (It worked when i tried with PF 5.2 and

Primefaces 6.0 xhtml page showing blank on redirect from another page

Using Primefaces 6.0/jsf 2.2.6. I have a page (secure), which includes another page (unsecure, there are 2 points of entry to the unsecure page hence this setup) backed by a bean, which uses a template, which is determined at runtime i.e.: so first secure page has: <h:body> <ui:include src="../unsecure/eacCalculator.xhtml" /> </h:body> Second page: <html xmlns="" xmlns:h="" xmlns:ui="

Primefaces Fileupload Listener not invoked

I am using the Prime faces file upload in advanced mode where it works fine in local system ,but in UAT the listener is not being called.why? i tried many suggestions ,still the same issue exists.please help me. UAT(Linux) i am using the tomee server Local(Windows) tomcat server primefaces 5.3 enter code here

How can I get the name of the file to be uploaded by primefaces

I am using the "FileUpload" component of primefaces with "advanced" mode, and I want to get the name of the file once the user makes his choice of the file that he wants to upload and before submitting. Attributes "Onstart" AND "Oncomplete" are executed after clicking the submit button, so I can not use them. I tried also getting the name using a validator methode, but It seems to be a primefaces bug, because the method is never invocked. <p:fileUpload id="fileToUpload" label="Browse"

Primefaces p:dataGrid: Is grid-layout with 4-2-1 columns possible?

I have a responsive DataGrid with 4 columns. <p:dataGrid value="#{myController.objList}" var="obj" layout="grid" columns="4"> <p:outputPanel> <h:outputText value="Label 1: " /> <h:outputText value="#{obj.field1}" /> </p:outputPanel> <p:outputPanel> <h:outputText value="Label 2: " /> <h:outputText value="#{obj.field2}" /> </p:outputPanel> </p:dataGrid> It depends on screen width (approximatel

JSF Primefaces many lines quote

Primefaces 6.1 new Text Editor component is using QuillJS 1.22 for rich text editing. Unfortunately this editor is parsing html code in his own way. When I put this in backing bean variable: <p>a<br>a<br>a</p> I end up with this: <p>a</p> <p><br></p> <p>a</p> <p><br></p> <p>a</p> Is there option to insert directly html code to an QuillJS editor from Primefaces?

Primefaces A filter or servlet of the current chain does not support asynchronous operations in push servlet

We have an issue when we are trying to implement the use servlet with the help of atmosphere dependency We can run in locally with current configuration but when my appliction is deployed to aws then push servlet not working. the logs in aws is My Aws server configration is Java 8 with Tomcat 8 version 2.1.3 64bit Amazon Linux 2016.03 v2.1.3 running Tomcat 8 Java 8 2016.03.2 Java 1.8.0_91 Tomcat 8.0.35 Apache 2.2.31 05-Dec-2017 13:26:32.162 SEVERE [http-nio-8080-exec-9] org.apache.catalina.c

Primefaces How to stop all p:poll with event onclick button

Example, i have 20 charts. there are have time refresh different. When updateChart, i'll dosomething and update success. <c:foreach var="chart" items="#{bean.charts}> <p:poll interval="#{chart.timeRefresh}" listener="#{bean.updateChart(chart)}"/> <div>..draw one-by-one chart here.</div> </c:foreach> <p:commandButton id="showInforDialog" actionlistener="#{bean.dosomething()}" onsuccess="PF('dlgInfor').show();"/> for example, alls chart have same time ref

JSF / primefaces handling of control character (form feed hex: 0x0c) in ajax requests?

I am curious about a edge case I have run across when using ajax requests in JSF / primefaces. I found that if I input a form feed character ("/f" in java or 0x0C in hex) into a request that is handled via ajax it causes the ajax request to fail because the xml generated is considered invalid. I would only expect this scenario to come up if a user is copying and pasting something from another document which happens to contain this character or more likely a QA person (or malicious user) input

export p:datatable to excel in PrimeFaces

I want to export a datatable to excel. I can not display the title of the datatable in excel. <p:commandLink ajax="false"> <h:outputLabel value="Excel"/> <p:dataExporter type="xls" target="idColPlanCompteM61Export" fileName="PlanCompteM61" postProcessor="#{planCompteM61ManagerBean.postProcessXLS}"/> </p:commandLink> <p:dataTable id="idColPlanCompteM61Export" var="ligne" value="#{planCompteM61ManagerBean.listeColPlanCompteM61Filtree

how to set a primefaces theme in portlet project

I'm developing a portlet project with primefaces and I want to change the default theme. I made a custom theme with jquery themeRoller and I made a jar file containing the theme as explained in the official documentation. The problem is the css resource is not found : Unable to find or serve resource, myTheme.css, from library, primefaces-myTheme. NB: in web.xml I put: <context-param> <param-name>primefaces.THEME</param-name> <param-value>myTheme</para

primefaces p:column exportOnly and exportable

I am using primefaces 3.2. And I need to use p:dataExporter. But parameters p:column exportable="false" and p:column exportOnly="true" does not works at all! What could be the reason of that? Here is the code: <p:dataExporter type="xls" target="dataTable" fileName="clients" postProcessor="#{clientBean.postProcessXLS}" /> <p:dataTable value="#{clientBean.model}" var="item" id="dataTable" emptyMessage="#{messages['message.empty']}" styleClass="list"

Primefaces RequestContext.getCurrentinstance().create("path for dialog") and destroy this dialog again doesnt work

I've tried to create a dialog from my Backing-Bean with the following code: <i>Map<String, Object> options = new HashMap<String, Object>(); options.put("modal", true); options.put("draggable", true); options.put("resizable", false); options.put("closable", true); options.put("contentHeight", 240); options.put("contentWidth", 500); // hint: available options are modal, draggable, resizable, width, // height, conte

Should primefaces be a jboss module? or just an WAR lib?

We have started using primefaces with JBoss EAP 6.2 in our new projects? I noticed that we use it configured as module in JBoss as opposed to just a WAR lib. Some examples online show it to be used as a module too. I'm a bit worried as this will tie us to a one specific version of the library for the whole instance. Which one is the right approach? Module War lib EAR lib (don't think this would work)

primefaces fileupload doesn't work in ie8

The problem occurs in IE8, after we click the upload button it just hangs and progress bar doesn't go away, but it works fine in Firefox. I'm using PrimeFaces 4.0 and JSF 2.0 <p:fileUpload id="getCompElementComponentId" label="Browse" fileUploadListener="#{applicationAction.addUpload}"

Different Colors in primefaces bar chart

I would like to show primefaces barchart with different colors for each bar. the most close I got is like the image: I would like to have different color those bars, like green for "on time", yellow for "warning " and red for "overdue" I tried to used model.setSeriesColors("58BA27,FFCC33,F74A4A,F52F2F,A30303"); but if i do that each bar should be a new series, therefore I won't be able to show the labels as I wish (like the image), I got this.. last, how can I make it show 0,1,2,3 (inte

primefaces DataExporter ignore columns that have h:link

the primefaces DataExporter ignores the the column where I use to link the result. <p:column> <f:facet name="header"> <h:outputText value="Brand" /> </f:facet> <h:link outcome="pretty:carBrand-page"> <h:outputText value="#{car.brand}" /> </h:link> </p:column> How can I get the brand also exported, without href ? Thanks

Multiple global filters in primefaces data tables

I have two primefaces dataTables on the same page and I need to add two global filters, one for each. But global filters only work if you the inputText id = "globalFilter". I cannot have two id's same as I get a duplicate id's error. Is there any work around for this? Thanks

Primefaces : Captcha id not visible but displays validation message

I'm using Primefaces captcha to fortify my authentication process, i followed every step there is to make it work including the generation of the public and private keys, but still it didn't work. The problem is that the captcha is not visible but it's preventing authentication by displaying a validation message at the same time. Here is the code : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ""> <html xmlns="http://www.w3

Primefaces Composite Component is not updating outside autocomplete

I know it seems like a duplicate question (and I found a lot of questions like mine, but none could solve my problem). In fact, as long as it can be a lack of attention of mine, yes it can be a duplicate. Here it is: I have two updates not working well: the most important is one, concerning a button inside a composite component (a p:dialog with its own h:form inside) trying to update a p:autoComplete in another h:form. The composite also receive a listener as a parameter and, in the listener, it

Primefaces When i click on dataexporter, it validates input fields instead of exporting datatable

I am writing code for adding and viewing vendor. But the issue is that, i added a dataexporter to export the table in different format. When i click on the dataexporter, it validates inpuut fields instead of exporting the datatable. see code below, <h:panelGrid columns="6"> <p:outputLabel value="Vendor Name: " for="vname"/> <p:inputText id="vname" required="true" value="#{bank.vendor_name}" />

Primefaces Add icon (e.g. material design or Prime Icons) to a p:inputText

I want to add an icon for an input text element, in a JavaEE project: <h:panelGroup styleClass="md-inputfield"> <p:inputText id="name" value="#{}" required="true" label="Nome" requiredMessage="inserisci il nome"> <f:validateLength minimum="2" /> </p:inputText> <p:outputLabel for="name" value="Nome" /> <p:message for="name" display="icon" /> </h:panelGroup> How Ca

Primefaces p:dataTable select single row using radioButton & single row select

im using primefaces, come from this Post without answer. Is it possible to select data from a row with RadioButton and also select by clicking on the row? when testing this code it works but RadioButton click didn't work <p:dataTable id="dato" value="#{aGuiaBean.listUsuario}" var="data" selectionMode="single" selection="#{aGuiaBean.usuarioSeleccionado}" rowKey="#{data.idUsuario}" > <p:column selectionMode="sin

Primefaces Non-editable rows in Primeface's treeTable

I am using Primeface's TreeTable, and I need only some rows to be editable (lowest level) and others to be non-editable. I have properties of article and they are categorized - so categories should NOT be editable and properties should be editable. Something like 1. Category 1 <- noneditable 1.1. Property 1 <- editable 1.2. Property 2 <- editable 2. Category 2 <- noneditable 2.1. Property 3 <- editable 2.2. Property 4 <- editable Tried to google it, but can't

  1    2   3   4   5   6  ... 下一页 最后一页 共 10 页