jsf-2

unable to use <p:ajax> on my primeface's datatable

柔情痞子 提交于 2019-12-11 06:59:45
问题 I'm having some problems with datatable's instant row selection, exactly <p:ajax/> . It's giving me this error: <p:ajax> Parent not an instance of ClientBehaviorHolder: org.primefaces.component.datatable.DataTable So I did some research and I think it's a problem with an old version, so I've updated my version to 3.0.M3-SNAPSHOT but I have still the same error and I wonder why! Here is my page code: <p:dataTable id="projets" var="p" value="#{projet.init()}" selection="#{projet

Losing validation with <f:ajax>

独自空忆成欢 提交于 2019-12-11 06:51:18
问题 I have this form: <h:form id="form"> <h:panelGrid columns="3" > <h:outputLabel for="name" value="Name:" /> <h:inputText id="name" value="#{register.person.name}" > <f:ajax event="blur" listener="#{register.validateName}" render="m_name" /> </h:inputText> <rich:message id="m_name" for="name" ajaxRendered="false"/> <!-- other fields --> <h:commandButton value="Register" action="#{register.registerPerson}" > <f:ajax execute="@form" render="out" /> </h:commandButton> <h:outputText value="#

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler process SEVERE: Error reading request, ignored

雨燕双飞 提交于 2019-12-11 06:49:02
问题 I'm developing a web application using Spring3, JSF2 and Primefaces3 in Tomcat6... My application works just fine if I'm using Firefox. If I run the app also with IE 8 I'm getting the exception stack shown below. This is very strange because if there were some incompatibility issues I would expect some visual errors not something thrown by apache tomcat... The exception stack: SEVERE: An exception or error occurred in the container during the request processing java.lang.NullPointerException

How to get server local drive path in web application?

一世执手 提交于 2019-12-11 06:46:00
问题 I am developing a jsf web application in which i have store some image files on my local computer lets say D:\images . The server running on this computer only. How can i access my local drive files on my web application. I tried <p:graphicImage value="D:\\Temp\tec0178.jpg"> or `<p:graphicImage value="D:/Temp/tec0178.jpg">` this not work for me. If i place the images in my web application <p:graphicImage value="resources/images/Male.png"/> its working. 回答1: If you need to store it on a

Class found in a Java application but not in JSF?

旧城冷巷雨未停 提交于 2019-12-11 06:44:42
问题 I'm trying to use bacnet4j with JSF. I build an application in .java which turn on/off a lamp, but if I try to call the same method from a JSF page (which communicates with my manage bean) , gives me : type Exception report message descriptionThe server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: com/serotonin/bacnet4j/type/Encodable root cause java.lang.NoClassDefFoundError: com/serotonin/bacnet4j/type/Encodable

No WebApplicationContext found: no ContextLoaderListener registered? [duplicate]

孤街醉人 提交于 2019-12-11 06:41:42
问题 This question already has answers here : No WebApplicationContext found: no ContextLoaderListener registered? (2 answers) Closed 2 years ago . I was able to load any xhtml page when I was using JSF and then I thought to add spring. I went to the documentation jsf spring integration and added el-resolver in my faces-config.xml: <?xml version="1.0" encoding="UTF-8"?> <faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation

What is f:attribute used for in this example?

孤者浪人 提交于 2019-12-11 06:36:13
问题 I'm trying to understand what a JSF snippet does. It goes something like this <composite:interface> <composite:attribute name="field" /> <composite:attribute name="value" default=""/> [...] </composite:interface> <composite:implementation> <ui:fragment rendered="some_logic_here"> <h:outputText value="#{cc.attrs.value}"> <f:attribute name="value" value="#{cc.attrs.field.value}"/> </h:outputText> </ui:fragment> </composite:implementation> The field attribute refers to a bean member that has

Conditional image rendering using JSTL <c:choose>

雨燕双飞 提交于 2019-12-11 06:32:29
问题 I`m developing a JSF application and I have a question regarding a Facelets page with JSTL. I want to display in an ui:repeat a number of question, a question and 3 answers (formated conditionally) and in front of the answers a tick (tickSmall.png) or an X (xSmall.png) if the questions are right or wrong. The answers are formated correctly, but the tick / X is not put correctly (I checked the booleans are correct, some are true, some are false). EVERY time it puts an X, even if there should

Commandbutton works only on second click until a <h:selectBooleanCheckbox> on a HashMap is removed

心不动则不痛 提交于 2019-12-11 06:29:01
问题 I'm working with JSF 2.2.9, i have the following dataTable and buttons: <h:commandButton id="commandButtonRemoverSelected" actionListener="#{managedBeanName.removeSelected()}" class="btn btn-primary" value="Sim"> </h:commandButton> <h:dataTable var="bean" value="#{managedBeanName.beans}" styleClass="table table-hover" binding="#{managedBeanName.dataTable}"> <h:column headerClass="smallColumn"> <f:facet name="header"> <h:selectBooleanCheckbox valueChangeListener="#{managedBeanName.selectAll}">

h:commandLink not firing the form.submit event

别等时光非礼了梦想. 提交于 2019-12-11 06:26:15
问题 When my page is loaded I execute the following JS script, which I use to display a popup saying (please wait...) when any form is submitted. jQuery(function(){ jQuery("form").submit(function(){jQuery('#wait-link').trigger('click');return true;}); }); This works fine when using h:commandButton tag, however when I use the h:commandLink tag it doesn't work because the form is submitted by java script (from the file jsf.js in the jar jsf-impl.jar) as shown below mojarra.jsfcljs = function jsfcljs