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
4
votes
3 answers

Using POJO as Model in JSF and JPA project, is that right?

i'm developing a project using JSF 2 and JPA 2 (EclipseLink 2.3). In JSF 2 I learned that we must separate the Model from Controller and the same thing to the View (thanks BalusC). But now with the POJO's generated from JPA, I wonder if the bean,…
Valter Silva
  • 16,446
  • 52
  • 137
  • 218
4
votes
1 answer

How do I get selectManyCheckBox to return something other than List?

This is a pattern that I would use over and over again if I get it to work. I have an enum name Log.LogKey that I want to user to pick out instances of. So the facelet has this:
AlanObject
  • 9,613
  • 19
  • 86
  • 142
4
votes
2 answers

Change the image of a JSF commandbutton with DHTML event onmouseover

I want to change the image of my button when the mouse goes over it. I rode the DHTML event onmouseover, can do that for me, but how? Do i need to create a javascript also for it? What should i do to make it work? This is my current…
javing
  • 12,307
  • 35
  • 138
  • 211
4
votes
1 answer

Dynamically adding fields to JSF form

I have the following situation that I would like to handle in JSF. My form consists of family information (name/address/phone) and then children information. Since a family can have more then one child, I need to be able to allow the person to click…
jr.
  • 4,503
  • 7
  • 44
  • 62
4
votes
1 answer

JSF Custom Component: How to get attribute of

I have written a custom component for jsf. The renderer extends com.sun.faces.renderkit.html_basic.ListboxRenderer. My component is in "javax.faces.SelectMany"-Family. The code in jsf-page looks like this:
CSan
  • 954
  • 1
  • 10
  • 25
4
votes
3 answers

Selenium and JSF 2.0

When I a generate SelectOneMenu with JSF2.0 the the id I specified in the xhtml is attached to a generated ID from JSF. e.g. out of my_fancy_id it generates j_idt9:my_fancy_id Now I want to test my page with Selenium 2 Web Driver. I try to re-find…
bertolami
  • 2,896
  • 2
  • 24
  • 41
4
votes
1 answer

XML or text declaration not at start of entity

Sorry being a bit daft. But I come to understand (my lack of knowledge) that it's not possible to forward to another page, if you want use RichFaces components on that page. This is some of the problems that I am experiance when forward to a page…
Chris
  • 712
  • 3
  • 16
  • 39
4
votes
3 answers

Simple primefaces application not working

I am trying to build simple JSF application using primefaces but somehow primefaces components are not getting rendered properly. I dont understand what is going wrong. I am trying to display following Facelet file :
Shekhar
  • 11,438
  • 36
  • 130
  • 186
4
votes
1 answer

Weaving Scala into existing Java EE projects?

I have many questions about scala. I have done a bit of reading and googling and SO'ing and not found any solid answers readily available. I'm not at the experimentation/prototyping stage yet, so I thought I might as well just ask my questions and…
DWoldrich
  • 3,817
  • 1
  • 21
  • 19
4
votes
1 answer

JSF datatable with binding with Session Scoped backing bean gets rendered again and again one every request

I have a XHTML page which on submission goes back to itself.The backing bean is session scoped. On the redirect to itself the page renders the h:dataable twice and gives me duplicate id error.I can visually see the table being rendered twice as well…
Java Ka Baby
  • 4,880
  • 11
  • 39
  • 51
4
votes
2 answers

How to write an eclipse content assist?

I want to write a plugin which will give me content assist support and work in JSF. I want it to work like the sample below : I'll type "p:button action="#{ Then I'll press "Ctrl+Shift+Space" (for example) It'll read the classes in my project and…
4
votes
2 answers

h:commandbutton, how to redirect to external site?(JSF 2)

When i use command button to redirect to pages, inside my project, u just need to give the name of the page with no extention, followed by ?faces-redirect=true in the action attribute and i will get redirected. But what if i want to get redirected…
javing
  • 12,307
  • 35
  • 138
  • 211
4
votes
1 answer

What is the canonical way to handle errors during Ajax-requests?

For normal requests we can simple register an in web.xml. However, this does not apply to Ajax-requests. By default errors during an Ajax-request will result in a little pop-window in the browser that shows the exception. The main…
Björn Pollex
  • 75,346
  • 28
  • 201
  • 283
4
votes
2 answers

How to refresh parent jsf page from richfaces popup

I have a JSF page with a few fields. I followed this tutorial from BalusC and all is good. I then added RichFaces support to it, which is working fine. I can see popups etc working. Now what I am trying to do is that once a person has been…
Java Ka Baby
  • 4,880
  • 11
  • 39
  • 51
4
votes
1 answer

Preserving bean values between views

I'm looking for best practices regarding preserving bean values between views using JSF 2. Consider the following scenario: * In view A, the view scoped bean ABean is instantiated and retrieves data for display in the view. * In view A you can click…
Robert
  • 485
  • 2
  • 6
  • 12