jsf-2

JSF MethodExpression javax.el.PropertyNotFoundException

落花浮王杯 提交于 2019-12-20 02:29:21
问题 I'm trying to develop a custom component that will need to call a method from the backingbean to get some data from the bb (this will be called in the decode phase after a certain Ajax call) with one parameter (it will come in the ajax call). The problem I'm having is that I define the attribute as a MethodExpression (in the taglibrary and the component), I get the Ajax post, decode the parameter and when I try to get the Method binding from the component I get the following error: javax.el

JSF: how prevent stackoverflow due to recursion during build phase (despite rendered test)

南楼画角 提交于 2019-12-20 02:04:26
问题 Apologies for not abstracting this problem in a dedicated test case, I hope the example from a real project is simple enough to describe the problem. I have a JavaEE/JPA2/JSF web application where every @Entity Element (or subclass) has a templated view.xhtml page, and a standard link generator composite component util:view_link.xhtml, invoked as GET with database ID as parameter. A portion (only) of each view page represents an expert system summary; that portion can be abstracted as a

How do I attach a FacesMessage from the backing bean to a specific field in a ui:repeat?

扶醉桌前 提交于 2019-12-20 01:41:39
问题 I have a form with a variable number of input elements, like this: <ui:repeat var="_lang" value="#{myBean.languages}"> <h:inputTextarea value="${_lang.title}" id="theTitle" /> <h:messages for="theTitle"/> </ui:repeat> When a certain method in the backing bean is triggered, I want to add a message to, say, the second iteration of the ui:repeat , but not the other ones. I've seen different variations of this question around here, and all problems appear to be due to the ui:repeat 's iterations

How do I attach a FacesMessage from the backing bean to a specific field in a ui:repeat?

♀尐吖头ヾ 提交于 2019-12-20 01:41:39
问题 I have a form with a variable number of input elements, like this: <ui:repeat var="_lang" value="#{myBean.languages}"> <h:inputTextarea value="${_lang.title}" id="theTitle" /> <h:messages for="theTitle"/> </ui:repeat> When a certain method in the backing bean is triggered, I want to add a message to, say, the second iteration of the ui:repeat , but not the other ones. I've seen different variations of this question around here, and all problems appear to be due to the ui:repeat 's iterations

javax.faces.FacesException: java.lang.ClassCastException: java.lang.String cannot be cast to javax.faces.component.UIComponent

筅森魡賤 提交于 2019-12-20 01:34:53
问题 My Java EE web application is working fine with Glassfish 2.1. Now I want to migrate to Glassfish 3.1.1 I have followed the modifications provided here my dependencies for richfaces are as follow:- <dependency> <groupId>org.richfaces.framework</groupId> <artifactId>richfaces-api</artifactId> <version>3.3.3.Final</version> </dependency> <dependency> <groupId>org.richfaces.framework</groupId> <artifactId>richfaces-impl-jsf2</artifactId> <version>3.3.3.Final</version> </dependency> <dependency>

Why <f:validateBean /> won't work?

吃可爱长大的小学妹 提交于 2019-12-19 19:57:08
问题 I use JSF 2.0, hibernate-validator4.2.jar validation-api.jar tomcat and Eclipse. I put @Size(min=3, message="xxx") annotation in a @ManagedBean and <f:validateBean /> between <h:inputText value="#{user.name}"></h:inputText> When I try to run the project i get this error... exception javax.servlet.ServletException: Expression Error: Named Object: javax.faces.Bean not found. javax.faces.webapp.FacesServlet.service(FacesServlet.java:606) root cause javax.faces.FacesException: Expression Error:

Why <f:validateBean /> won't work?

試著忘記壹切 提交于 2019-12-19 19:56:37
问题 I use JSF 2.0, hibernate-validator4.2.jar validation-api.jar tomcat and Eclipse. I put @Size(min=3, message="xxx") annotation in a @ManagedBean and <f:validateBean /> between <h:inputText value="#{user.name}"></h:inputText> When I try to run the project i get this error... exception javax.servlet.ServletException: Expression Error: Named Object: javax.faces.Bean not found. javax.faces.webapp.FacesServlet.service(FacesServlet.java:606) root cause javax.faces.FacesException: Expression Error:

p:selectOneRadio not updating model in event “change” with p:ajax

大兔子大兔子 提交于 2019-12-19 19:07:12
问题 I'm using an p:selectOneRadio with p:ajax and the value of another component ( p:inputText ), not binding its value in my bean. If I use p:selectBooleanCheckbox instead the behavior is exactly what I need, update the bean before calling the method in ajax. Is this a bug in p:selectOneRadio or is this its default behavior? I'm using JSF2 , PrimeFaces 4 The xhtml code: <p:selectOneRadio id="enumId" value="#{xyzController.entity.enumValor}" disabled="#{disabled}" required="true" plain="true"> <f

p:selectOneRadio not updating model in event “change” with p:ajax

本小妞迷上赌 提交于 2019-12-19 19:06:53
问题 I'm using an p:selectOneRadio with p:ajax and the value of another component ( p:inputText ), not binding its value in my bean. If I use p:selectBooleanCheckbox instead the behavior is exactly what I need, update the bean before calling the method in ajax. Is this a bug in p:selectOneRadio or is this its default behavior? I'm using JSF2 , PrimeFaces 4 The xhtml code: <p:selectOneRadio id="enumId" value="#{xyzController.entity.enumValor}" disabled="#{disabled}" required="true" plain="true"> <f

Property not readable on type java.lang.String when using JSF PrimeFaces

安稳与你 提交于 2019-12-19 18:54:14
问题 I am trying to implement lazy loading data in data table using the demo code in the site PrimeFaces Lazy loading and I am getting the error javax.el.PropertyNotFoundException: /table.xhtml @14,49 value="#{car.year}": Property 'year' not readable on type java.lang.String Here is my table.xhtml code <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui