Questions tagged [jsf-2]

JavaServer Faces (JSF) is a model-view-presenter framework typically used to create web applications. Version 2.x is a major step ahead compared to JSF 1.x, significantly expanding the standard set of components and component libraries.

JavaServer Faces 2.x is a major step ahead as compared to JSF 1.x, significantly expanding the standard set of components and component libraries. Facelets (which was designed specifically for JavaServer Faces) was adopted as the official view technology for JSF 2.x. This eliminates the life-cycle conflicts that existed with JSP, forcing workarounds by Java developers. Lot of things which are hardly possible in JSF 1.x can be done more elegantly in JSF 2.x.

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

15731 questions
34
votes
1 answer

Upgrade JSF / Mojarra in JBoss AS / EAP / WildFly

How do I upgrade Mojarra in JBoss server and tell it use the given Mojarra 2.x JARs instead of JBoss own jboss-jsf-api_2.1_spec-2.0.1.Final.jar as indicated in startup log? If that's relevant, I am currently using JBoss AS 7.1.
user2172625
  • 463
  • 2
  • 8
  • 16
33
votes
3 answers

NLS missing message: CANNOT_FIND_FACELET_TAGLIB

I am getting this warning in Eclipse: NLS missing message: CANNOT_FIND_FACELET_TAGLIB in: org.eclipse.jst.jsf.core.validation.internal.facelet.messages ICEfacesPage1.xhtml /myapp/src/main/webapp On the following…
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498
33
votes
3 answers

How to dynamically add JSF components

Can I add JSF components dynamically? I need to have a form with a button which should add one to the form. Is this possible? I know this should be possible in JavaScript somehow. Do anybody know how to do this in JSF? I think the…
ErVeY
  • 1,524
  • 4
  • 16
  • 26
32
votes
2 answers

JSF request scoped bean keeps recreating new Stateful session beans on every request?

I'm building my first Java EE application using JSF, PrimeFaces, Glassfish and Netbeans. Because I'm new, it's possible I'm approaching the core problem wrong. Core problem: I want to maintain user's information securely. There seems to be…
Alan B. Dee
  • 5,490
  • 4
  • 34
  • 29
32
votes
4 answers

CDI Injection into a FacesConverter

From just a few searches, this seems like a problem that has been around for a while. I have written a FacesConverter that looks like the following. The object Category is a JPA entity and CategoryControl is the DAO that fetches…
AlanObject
  • 9,613
  • 19
  • 86
  • 142
32
votes
3 answers

How can I get a message bundle string from inside a managed bean?

I would like to be able to retrieve a string from a message bundle from inside a JSF 2 managed bean. This would be done in situations where the string is used as the summary or details parameter in a FacesMessage or as the message in a thrown…
Jim Tough
  • 14,843
  • 23
  • 75
  • 96
32
votes
3 answers

Java EE vs JSP vs JSF

I am looking to learning a Java technology for developing web applications. As I looked more into this, I became confused between jsf, jsp, and javaee. I know there are several posts on SO (post 1, post 2) which attempt to resolve these confusions,…
Oliver Spryn
  • 16,871
  • 33
  • 101
  • 195
32
votes
2 answers

Understand Flash Scope in JSF2

From what I understand , objects placed inside the Flash scope in a faces request lifecycle will be available for the next faces request lifecycle and then clear. Suppose I have two pages: page01.xhtml:
Ken Chan
  • 84,777
  • 26
  • 143
  • 172
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
1 answer

Spawning threads in a JSF managed bean for scheduled tasks using a timer

I would like to know if it's ok to use Timer inside application scoped beans. Example, lets say that I want to create a timer task that sends out a bunch of emails to every registered member one time per day. I'm trying to use as much JSF as…
Dimman
  • 1,186
  • 4
  • 14
  • 21
31
votes
1 answer

How to skip validation when a specific button is clicked?

I have a form with a validator on one field. I have two h:commandButtons: Ok and Cancel. When I input wrong data and click Cancel, I get a validation message. What must I do that validator don't run when I click cancel?
Aram Gevorgyan
  • 2,175
  • 7
  • 37
  • 57
31
votes
1 answer

@ViewScoped calls @PostConstruct on every postback request

This doesn't seem right. I was doing some cleanup of my code and I just noticed this. Every ajax request is firing the constructor and @PostConstruct of my @ViewScoped bean. Even a simple database pagination is firing it. I understood that…
Drew H
  • 4,699
  • 9
  • 57
  • 90
30
votes
3 answers

Execute two methods in action in JSF

Is it possible to execute two methods in action of ? For example,
IAdapter
  • 62,595
  • 73
  • 179
  • 242
30
votes
1 answer

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

Here is my layout
30
votes
6 answers

Recommended JSF 2.0 CRUD frameworks

Can somebody recommend any framework to facilitate CRUD development in JSF 2.0? Aspects I value most: As lightweight as possible; limited dependencies on third party libraries Support for an evolving domain model Limited need for repetitive coding;…
Jan
  • 9,397
  • 13
  • 47
  • 52