Linked Questions
13 questions linked to/from Avoiding duplicate ids when reusing facelets compositions in the same naming container
1 vote
1 answer
2k views
How to avoid namespace collision when including identical XHTML JSF 2.0 files [duplicate]
In my JSF 2.0 project, I get a name-space collision when I include two identical XHTML files in a single parent XHTML file. My goal is to create a dashboard of identical controls on a single page, ...
2 votes
1 answer
863 views
How to ensure different ids for JSF taglib sub-components? [duplicate]
Let us assume that we have defined the JSF tag lib with following code: <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"> <h:panelGrid ...
110 votes
2 answers
61k views
When to use <ui:include>, tag files, composite components and/or custom components?
I started using JSF 2.0 with Facelets recently and got puzzled by new composite components knowing existing <ui:include> and other templating techniques offered by Facelets 1.x. What is the ...
25 votes
2 answers
18k views
How to make a grid of JSF composite component?
I have lot's of outputLabel and inputText pairs in panelGrids <h:panelGrid columns="2"> <h:outputLabel value="label1" for="inputId1"/> <h:inputText id="inputId1/> <h:...
7 votes
2 answers
10k views
Jsf How to create a Naming Container
I have a problem with duplicated ids in my JSF app. I've read in this post that one of the possible solutions is to use Naming Container. Can you give me some example how to use the Naming Container ...
6 votes
1 answer
7k views
When and how is clientID generated in JSF?
In order to more understand the clientID generation in JSF (2.x), could someone explain to me when exactely does JSF generates the client ID (which lifecycle phase, build time or render time ...)? ...
4 votes
1 answer
1k views
Reuse some .xhtml pages on a JSF primefaces application
I developing a simple application using JSF and PrimeFaces and here's a problem that I'm facing: These are managed beans that have a Person property: ClientBean EmployeeBean I have the person.xhtml ...
2 votes
1 answer
2k views
JSF includes and duplicate HTML IDs
I have a main HTML page which includes detail.xhtml and duo.xhtml. Now duo.xhtml also includes detail.xhtml, which results in duplicate IDs which of course it not working. What can I do to solve this ...
2 votes
1 answer
994 views
How to add a Validator to ui:include?
Mojarra 2.1 I have the facelet (namespaces ommited) inc.xhtml: <f:view> <h:inputText id="name" value="#{bean.name}" required="true"> <f:validateLength maximum="32" /> ...
2 votes
1 answer
1k views
JSF include vs iframe - pros and cons
I am on a team that is interested in using ui:include to embed external resources in a HTML document. While investigating how to do this, I came across this post: JSF Facelets how to include external ...
0 votes
1 answer
816 views
How to call the same method after every include of a .xhtml page in JSF?
I have the following part of a .xhtml page: <ui:composition template="./templates/template.xhtml"> <ui:define name="mainContent"> <ui:include src="include/includeAbleEditor.xhtml"&...
0 votes
1 answer
750 views
JSF: duplicate component id exception when including the same facelets tag twice
I have a facelets tag like this: <ui:composition> <h:outputText value="#{label}"/> <h:inputText id="input" value="#{value}"/> <h:message for="input"/> </ui:...
0 votes
0 answers
45 views
Setting Bean from pure HTML Element
Due to accessibility of the dynamic ID I cannot use JSF <h:inputHidden/> and instead must use HTML: <input type="hidden" id="sound_#{recordingTag}" value="#{wavRecorded}"/> When I use ...