18
votes
2answers
9k views

JSTL in JSF2 Facelets… makes sense?

I would like to output a bit of Facelets code conditionally. For that purpose, the JSTL tags seem to work fine: <c:if test="${lpc.verbose}"> ... </c:if> However, I'm not sure if ...
41
votes
1answer
6k views

How to choose the right bean scope?

I noticed that there are different bean scopes like: @RequestScoped @ViewScoped @SessionScoped @ApplicationScoped What is the purpose of each? How do I choose a proper scope for my bean?
66
votes
8answers
18k views

Why JSF calls getters multiple times

Let's say I specify an outputText component like this: <h:outputText value="#{ManagedBean.someProperty}"/> If I print a log message when the getter for someProperty is called and load the ...
149
votes
5answers
55k views

What is the difference between JSF, Servlet and JSP?

Is JSP = Servlet? And JSF = Pre-build UI based JSP (like asp.net web control)?
72
votes
3answers
27k views

Differences between action and actionListener

What is the difference between action and actionListener, and when should I use action versus actionListener?
40
votes
2answers
12k views

ViewParam vs @ManagedProperty(value = “#{param.id}”)

What is the difference between defining View Params like this: <f:metadata> <f:viewParam name="id" value="#{someBean.id}"/> </f:metadata> And defining the property in the ...
55
votes
3answers
29k views

Migrating from JSF 1.2 to JSF 2.0

I am working with a rather large app written in JSF 1.2. JSF 1.2 is around 6 years old now. I need to upgrade to JSF 2.0. How painful will this be? I noticed that some attributes in custom tags have ...
33
votes
3answers
46k views

JSF - get managed bean by name

I'm trying to write a custom servlet (for AJAX/JSON) in which I would like to reference my @ManagedBeans by name. I'm hoping to map: http://host/app/myBean/myProperty to: ...
12
votes
4answers
12k views

How to reference components in JSF ajax? Cannot find component with identifier “foo” in view

The following code is inspired from Primefaces' DataGrid + DataTable Tutorials and put into a p:tab of a p:tabView residing in a p:layoutUnit of a p:layout. The code stops working and gives the ...
28
votes
3answers
39k views

javax.faces.application.ViewExpiredException: View could not be restored

I have written simple application with container-managed security. The problem is when I log in and open another page on which I logout, then I come back to first page and I click on any link etc or ...
16
votes
5answers
28k views

JSF 2.0 File upload

I am looking around a few blogs, to try to find how to upload files using JSF 2.0 But all the solutions kind of confuse me. I would like to know what do I exactly need to be able to successfully ...
4
votes
1answer
520 views

Why do I need to nest a component with rendered=“#{some}” in another component when I want to ajax-update it?

So I've found a few answers close to this, and I've found enough to fix the problem I had. But even so, I'm curious as to understand the workings around this. Let me illustrate with an example : I ...
13
votes
5answers
10k views

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 ...
10
votes
2answers
12k views

How to create dynamic JSF 1.2 form fields

We are using JSF 1.2 and Seam 2.2. I have found some similar questions like this one, however there are so many ways this can be done that it made me more confused. We are getting a XML file that we ...
30
votes
5answers
10k views

Is it possible to use JSF+Facelets with HTML 4/5?

Facelets relies on XML namespaces to work with XHTML. How are HTML 4, and as far as I know, HTML 5 do not support namespaces. Also HTML 5 has some new elements that are not available in XHTML. Even ...

1 2 3 4 5 51
15 30 50 per page