jsf-2.0

PrimeFaces wizard component resets values in <h:select* /> components when form is submitted

I have the following selectManyCheckbox inside a p:wizard component: <p:wizard id="wizard"> <p:tab id="page1" > <h:selectManyCheckbox value="#{userController.user.roles}" layout="pageDirection" converter="securityRoleConverter"> <f:selectItems value="#{userController.rolesSelectMany}" /> </h:selectM...

How to ignore invalid XML in JSF?

Is it possible to ignore invalid xml-syntax in jsf-files? I'm writing my own components is jsf 2 and want to create a dynamic table, so i want to render tr- and td-tags conditional. I've tried <h:panelGroup rendered="#{someCondition}"><tr></h:panelGroup> (same with </tr>) and <c:if test="#{someCondition}"><tr></c:if> (same with </tr>) ...

Richfaces Primefaces JSF 2.0 configuration

I am currently using JSF 2.0 and Richfaces 3.3.3 and it's working fine. Now I want to add Primfaces to it; I had added required jar but the components are not rendered is there any configuration i have to add in faces-config or web.xml. ...

JSF 2.0 loading the bundle

Hi, I got the following error: > org.apache.jasper.JasperException: An > exception occurred processing JSP page > /ajax/busstop_ajax.jsp at line 12 10: <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%&gt; 11: <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%&gt; 12: <f:loadBundle basename="/../messages.Message...

Enterprise Aplication with EJB, JSF and JAX-RS

What is the best Maven archetype to use on enterprise application in java using EJB and JAX-RS, considering that in a near future i will have to make a front-end in JSF2 using as the backend EJBs used with the JAX-RS? ...

How to do client side updates in JSF 2.0

I'd like to do client side component updates. Example: disable a button when a checkbox is clicked: <h:selectBooleanCheckbox value="true" onchange="button.disabled=true" /> <h:commandButton id="button" value="Save" /> The above doesn't work. Is there a way to do this declaratively in JSF? ...

Data flow between views in JSF 2

Hello. I'm currently building my first JSF 2 application and I have some questions regarding flow of data between views. Background The application keeps track of competences of IT-consultants. To illustrate my questions, I will just describe a small part of it. A Competence entity has a many-to-one relation to a Area entity, putting ...

Is it possible that on clicking node data is fetched lazily and rich:tree further nodes are generated dynamically.

Currently I am fetching whole List from DB but DB contains about 2000 rows so is there any way to generate rich tree on clicking node data is fetched lazily and tree is build dynamically. ...

Why doesn't h:dataTable inside ui:repeat get correct ID?

Code: <ui:repeat var="obj" value="#{demo2Bean.someList}"> <h:panelGroup id="foo" /> <h:dataTable id="bar" /> </ui:repeat> Result: <span id="j_idt55:0:foo"></span> <table id="j_idt55:0:bar"><tbody><tr><td></td></tr></tbody></table> <span id="j_idt55:1:foo"></span> <table id="j_idt55:0:bar"><tbody><tr><td></td></tr></tbody></ta...

How to refer to dataTable parent within the dataTable?

Consider a dummy case: <h:form id="wrapperForm"> <h:panelGroup id="rowsContainer"> <h:dataTable id="rowsTable" value="#{bean.rows}" var="row" > <h:column> <h:commandButton value="Click me to update (#{component.parent.parent.parent.clientId})"> <f:ajax render=":#{component.pare...

JSF 2.0: Why does f:ajax send all the form fields and not only those marked with execute-attribute?

Seems like I am having a bunch of JSF related questions these days... here it goes again: why does AJAX call declared with f:ajax post all the fields of the form and not only those declared with execute? This question was already asked in the Sun forums, but as they are now closed I cannot reply there. The thread there is a stub with no ...

JSF 2.0 timer component

I'm looking for a component that counts down a specific duration on the client side (e.g. to display the remaining time until an auction finishes). The component does not need to necessarily perform an action when the timer is timed out. It should basically print the timer in a human readable form, e.g. 1 hour 2 minutes 23 seconds and up...

JSF / Mojarra 2.0.2: ui:repeat is totally broken when updating via AJAX

Using ui:repeat for simple listing of elements produces very strange results - when you add an element, the first element is always replaced with the values from the last element before the submit. Same occurs when removing the elements - the first element shows actually the just removed element. With h:dataTable the same works perfectl...

JSF 2.0 request.getParameter return a string with wrong encoding

Hi, I'm writing an application in JSF 2.0 which supports many languages, among them ones with special characters. I use String value = request.getParameter("name") and POST method, the page encoding is set to UTF-8 and the app is deployed on apache tomcat 6 which has the connector set correctly to utf-8 in a server.xml file: <Connector...

jsf 2 project structure

Does any expert here have any particular preference for a JSF 2's project structure. Currently, I have the following: root Java Resources: src dao.au.com.xyz model.au.com.xyz ant WebContent META-INF resources css javascript images WEB-INF sections (for common sections like: men...

Differences between action and actionListener

What is the difference between action and actionListener. When sould I use action and/or actionListener? My question is related JSF 2.0. ...

How to access managed bean and session bean from Servlet

Here is how my commandLink work <p:dataTable value="#{myBean.users}" var="item"> <p:column> <h:commandLink value="#{item.name}" action="#{myBean.setSelectedUser(item)}" /> </p:column> </p:dataTable> then in myBean.java public String setSelectedUser(User user){ this.selectedUser = user; return "Pro...

How to synchronize a4j:jsFunction and actionListener in Jsf

I have following code for execution but it is giving some problem related ajax request. /* actionListener Call on Button Click **/ /** A4j:jsFunction createNewLog() function has to complete first executeTool() function has to complete after that. Currently it is calling in same way but ...

Complex Richfaces form - How to do it?

Suppose, I want to convert the form shown in the link below to a Richfaces form.What I will do is I will take each section and write .xhtml file. This file will contain Richfaces controls like datatables ,toggle panels etc.. Form I want to make each cell clickable like Producer,Insured,Coverages as shown in the form. I dont know how...

JSF complex cascading radio buttons

I need to port an application from PHP to JSF 2. Everything is fine except for a rather complex radio button group: When 'Process Application for:' is selected, the child radio button group is enabled. Within that, when 'Other' is selected, the corresponding text box is enabled. When 'Brands' is selected, those two text boxes are en...