Linked Questions
33 questions linked to/from What is component binding in JSF? When it is preferred to be used?
82 votes
2 answers
122k views
How does the 'binding' attribute work in JSF? When and how should it be used?
There are lot of materials out there differentiating value attribute and binding attribute in JSF. I'm interested in how both approaches differ from each other. Given: public class User { ...
180 votes
3 answers
103k 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 this ...
37 votes
4 answers
42k views
How to let validation depend on the pressed button?
I have created form and I want to show previous existing items on a table while a new one is creating. I'd like to show matching items as form is filling up. But when I try to filter the list without ...
32 votes
5 answers
27k views
Why does @PostConstruct callback fire every time even though bean is @ViewScoped? JSF
I am using datatable on page and using binding attribute to bind it to my backing bean. This is my code :- <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1....
28 votes
2 answers
46k views
Difference between value and binding
What is the difference between using value and binding with JavaServer Faces, and when would you use one as opposed to the other? To make it clearer what my question is, a couple of simple examples ...
20 votes
3 answers
27k views
Retrieving other component's client ID in JSF 2.0
Does JSF 2.0 have a built-in method for finding the client ID of another component? There are about a thousand client ID-related questions on SO and there are a lot of hackish methods to do this, but ...
15 votes
1 answer
32k views
What is the advantages of using binding attribute in JSF? [duplicate]
See the following code: <h:inputText id="name" value="#{jsfBean.name}" binding="#{jsfBean.htmlInputText}"/> In the above example we are using the binding attribute to link with the server side ...
13 votes
1 answer
16k views
JSF component binding without bean property
How does exactly the following code work: #{aaa.id} <h:inputText id="txt1" binding="#{aaa}"/> I mean, usually the component binding works, by specifying a property (of type UIComponent) in a ...
5 votes
1 answer
9k views
JSF Validator compare to Strings for Equality
How would you compare two string for equality in a JSF Validator? if (!settingsBean.getNewPassword().equals(settingsBean.getConfirmPassword())) { save = false; FacesUtils.addErrorMessage(null,...
8 votes
2 answers
7k views
Split java.util.Date over two h:inputText fields representing hour and minute with f:convertDateTime
I would like to set up a Date field in my page like this |hours| h |minutes| where hours and minutes are in separated inputText. The bean have this date import java.util.Date; ... private Date ...
4 votes
2 answers
17k views
How to use component binding in JSF right ? (request-scoped component in session scoped bean)
Mojara 2.1.21 I've updated my question based on comments. I have two situation where a component is bound to server session bean. (Additional links with information: Binding attribute causes ...
7 votes
1 answer
17k views
Component ID has already been found in the view when using datatable with binding and Session Scoped [duplicate]
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:datatable twice and gives me duplicate id error.I can ...
6 votes
1 answer
9k views
JSF component binding - some confusion
From web pages like this one, http://www.jsftutorials.net/components/step5.html I understand that the binding attribute in JSF tag/view component is to bind the view component to a Java instance of ...
3 votes
3 answers
16k views
Reset inputText after Button Click with JSF
Is it possible to reset the value of an inputText after clicking on the commandButton in JSF? The inputText UIElement provides the method ResetValue so I tried something like this: <h:inputText ...
6 votes
1 answer
4k views
component binding vs findComponent() - when to use which?
As described in this question I try to perform some field validation in a form on the backing bean side. For this I would like to access the violating fields to mark them. From searching the web ...