Questions tagged [jsf-2.2]

JavaServer Faces 2.2 is the major JSF upgrade that's part of Java EE 7. It has some significant new features like task flows (Faces Flow), a stateless mode, basic theming (resource library contracts), build-in HTML5 support and a much improved "bare HTML" mode (passthrough elements). Starting from this version, JSF formally supports CDI and for some features even depends on CDI.

For the real wiki, please jump over to the wiki: https://stackoverflow.com/tags/jsf/info.

2253 questions
39
votes
2 answers

How to install and use CDI on Tomcat?

I'm creating my first project Java EE 7, but I'm having trouble. Appreciate any help. Tomcat 7.0.34 JSF 2.2 Primefaces 3.5 javaee-api-7.0.jar When the application start, the Tomcat log shows the following message: "validateJarFile…
Rogério Arantes
  • 712
  • 1
  • 8
  • 29
30
votes
1 answer

JSF 2.2 Memory Consumption: Why does Mojarra keep the ViewScoped Beans of the last 25 Views in Memory?

Memory per Session grows We are experiencing high memory consumption using JSF 2.2 (2.2.12) with Mojarra. After investigating our load tests, it turned out that the size of data in our ViewScoped Beans is quite high (sometimes more than 1MB). Anyway…
fischermatte
  • 3,327
  • 4
  • 42
  • 52
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
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
26
votes
3 answers

JSF 2.2 faces-config: Unknown Schema version: 2.2

I'm trying to use the Faces 2.2. I get an error. SEVERE: Critical error during deployment: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document…
Rhododendron
  • 559
  • 2
  • 7
  • 15
20
votes
3 answers

Target Unreachable, identifier resolved to null in JSF 2.2

I have a problem with JSF 2.2 and CDI, my managerbean is not solved and this error appear "value="#{userBean.user.name}": Target Unreachable, identifier 'userBean' resolved to null" This is my manager bean. @ManagedBean @RequestScoped public…
SaXeTz
  • 500
  • 1
  • 3
  • 14
18
votes
1 answer

How to upload file using JSF 2.2 ? Where is the saved File?

I would like to be able to upload files in my JSF2.2 web application, so I started using the new component. My only question is, how can I specify the location, where the files will be saved in the server? I would like to get hold of…
t3s0
  • 272
  • 1
  • 2
  • 11
17
votes
1 answer

Pass an object between @ViewScoped beans without using GET params

I have a browse.xhtml where I browse a list of cars and I want to view the details of the car in details.xhtml when a "View more" button is pressed. Their backing beans are @ViewScoped and are called BrowseBean and DetailsBean, respectively. Now, I…
Chris
  • 3,619
  • 8
  • 44
  • 64
17
votes
2 answers

How to access enum properties in EL?

Given the following enum. public enum Constants { PAGE_LINKS(10); //Other constants as and when required. private final int value; private Constants(int value){ this.value = value; } public int getValue(){ …
Tiny
  • 27,221
  • 105
  • 339
  • 599
15
votes
3 answers

Which XML namespace to use with JSF 2.2 and up

I have migrated my application from JSF 1.2 to 2.2. It used XML namespaces on java.sun.com domain like xmlns:f="http://java.sun.com/jsf/core". However, Oracle's Java EE 7 tutorial is using XML namespaces on xmlns.jcp.org domain like…
Valsaraj Viswanathan
  • 1,473
  • 5
  • 28
  • 51
15
votes
1 answer

Execute JavaScript before and after the f:ajax listener is invoked

It there an easy way to invoke a JavaScript action before and after the invocation of an , e.g. I'd like to invoke window.alert("pre") before and window.alert("post") after onChange is invoked in the backing bean ACtrl:
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
15
votes
1 answer

When to use preRenderView versus viewAction?

When should one use the preRenderView event to initialize data for a page versus using the viewAction? Are they equal in use and do they have the same effect? preRenderView Event
Dimitri Dewaele
  • 10,311
  • 21
  • 80
  • 127
14
votes
4 answers

How can I upload multiple files with JSF 2.2

I am trying to add a multiple file upload using h:inputFile. I had a quick look through the source code and it appears that it does not have the option to render multiple="multiple". Is there a way around this without writing a custom component? If…
Ioannis Deligiannis
  • 2,679
  • 5
  • 25
  • 48
13
votes
1 answer

Call order of h:commandLink action and f:ajax listener

Here is my markup: I tried to run this page in Mojarra-2.2.8(wildfly 8.2.0.Final…
xiefei
  • 6,563
  • 2
  • 26
  • 44
13
votes
1 answer

Should be used for JSF 2.2 CSRF protection?

I am confused. I see that JSF 2.0 has implicit CSRF protection: How JSF 2.0 prevents CSRF On the other side according to the article http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/JSF-CSRF-Demo/JSF2.2CsrfDemo.html we should add the…
Michael
  • 10,063
  • 18
  • 65
  • 104
1
2 3
99 100