Questions tagged [primefaces]

PrimeFaces is a JSF (Java Server Faces aka Jakarta Faces) component library that ships with a large set of rich components which utilizes jQuery under the covers as well as a few other select JavaScript libraries. It is a very mature library with an active development community.

PrimeFaces is a component library. It was one of the first which supports JSF 2.0 from top to bottom. It ships with a large set of components (over 100) and tools. Components utilize under the cover.

Online resources

Books

Related tag info pages

19281 questions
34
votes
1 answer

What is the function of @this exactly?

As far as I know the @this is to denote the current component triggering the event, such as : And in JSF 2 Ajax, the @this can also mean the encapsulating component, like :
Bertie
  • 17,277
  • 45
  • 129
  • 182
34
votes
9 answers

How to do double-click prevention in JSF

We have a few search pages that run against a lot of data and take a while to complete. When a user clicks on the search button, we'd like to not allow them to submit the search result a second time. Is there a best practice for doing…
BestPractices
  • 12,738
  • 29
  • 96
  • 140
34
votes
6 answers

Display database blob images in inside

I'm using PrimeFaces 3.2 on JBoss 7.1.1. I am trying to display an image which is stored in a BLOB in a MySQL database in . The image is stored in a byte[] and then converted to a StreamedContent as follows: InputStream stream = new…
33
votes
1 answer

JSF(Primefaces) ajax update of several elements by ID's

One more question concerning JSF.Particularly, Primefaces. Have following problem with ajax update of elements by id's at same time. If elements on page goes one by one ,that ajax update performs ok:
sergionni
  • 13,290
  • 42
  • 132
  • 189
33
votes
2 answers

Hide pagination buttons in table header of p:dataTable

I'm using of PrimeFaces 3.3.1 with pagination. The pagination buttons appear in both the table header and footer. I would like to hide the pagination buttons in the table header and keep the ones in the table footer. How can I achieve…
Phúc
  • 421
  • 1
  • 5
  • 11
32
votes
6 answers

How to trigger component refresh from javascript in primefaces?

Is it possible to update a PrimeFaces component from javascript so that it would be force to refresh? I am making an ajax save call using this button in a dialog. I have attached my custom javascript on the oncomplete event.
Mark Estrada
  • 9,013
  • 37
  • 119
  • 186
31
votes
4 answers

Ajax update doesn't work, when using filter on p:dataTable

I have a datable which includes the filter feature of primefaces. Some operations can be done on the table (e.g. edit). The datable will be updated after the user's operation is completed using ajax. It updates the table directly and works well, if…
Johnny2012
  • 1,512
  • 8
  • 31
  • 46
30
votes
1 answer

JSF + PrimeFaces: `update` attribute does not update component

Here is my layout
30
votes
3 answers

Real time updates from database using JSF/Java EE

I have one application running in the following environment. GlassFish Server 4.0 JSF 2.2.8-02 PrimeFaces 5.1 final PrimeFaces Extension 2.1.0 OmniFaces 1.8.1 EclipseLink 2.5.2 having JPA 2.1 MySQL 5.6.11 JDK-7u11 There are several public pages…
Tiny
  • 27,221
  • 105
  • 339
  • 599
30
votes
3 answers

Calling Primefaces dialog box from Managed Bean function

Hi I have a managed bean with some functions , based on some condition in that function I will like to call a dialog box Managed bean function goes as public String editStudent(){ setReadOnly(false); setButton(true, true, true,…
NKS
  • 1,140
  • 4
  • 17
  • 35
29
votes
6 answers

File upload doesn't work with AJAX in PrimeFaces 4.0/JSF 2.2.x - javax.servlet.ServletException: The request content-type is not a multipart/form-data

Important : The issue which is discussed in this thread has been fixed as of PrimeFaces 5.1 final (community release) released on Monday, October 6, 2014 (just a few minutes ago from now). I attempted on JSF 2.2.8-02 (or api, impl). As such, if you…
Tiny
  • 27,221
  • 105
  • 339
  • 599
29
votes
4 answers

difference between JSF, RichFaces, PrimeFaces and IceFaces

I am new to jsf and want to know about the clear difference between JSF, Rich-/Prime-/IceFaces. In JSF we create pages with .jsp extension and write java code in the backing beans. But how exactly all "faces" are different and related to jsf.
learner
  • 757
  • 2
  • 14
  • 35
27
votes
1 answer

Displaying Hashmap keys and values in a primefaces DataTable

I'm trying to display a Hashmap in a DataTable, here's what i'm trying to do : I'll have a select menu of some products, and an input text for quantity, an "ajaxified" add button that adds the product and its quantity to the map, and a submit button…
snajahi
  • 900
  • 2
  • 14
  • 26
27
votes
1 answer

How to use java.time.ZonedDateTime / LocalDateTime in p:calendar

I had been using Joda Time for date-time manipulation in a Java EE application in which a string representation of date-time submitted by the associated client had been converted using the following conversion routine before submitting it to a…
Tiny
  • 27,221
  • 105
  • 339
  • 599
27
votes
6 answers

Using a "Please select" f:selectItem with null/empty value inside a p:selectOneMenu

I'm populating a from database as follows.
Tiny
  • 27,221
  • 105
  • 339
  • 599