jsf-2

ReferenceError: PF is not defined

淺唱寂寞╮ 提交于 2019-12-19 05:56:08
问题 I tried the NotificationBar example of PrimeFaces, however it didn't work. I get the following JS error: ReferenceError: PF is not defined I think I need to include a library before using PF() function, but I don't know which library and where can I find it. 回答1: The JS function PF() is only available since 4.0. You're apparently using PF 3.x. Look at the footer of the showcase site, it's currently saying that it's running PF 4.0. Just use widgetVar.show() , where widgetVar is the widget

ReferenceError: PF is not defined

偶尔善良 提交于 2019-12-19 05:55:09
问题 I tried the NotificationBar example of PrimeFaces, however it didn't work. I get the following JS error: ReferenceError: PF is not defined I think I need to include a library before using PF() function, but I don't know which library and where can I find it. 回答1: The JS function PF() is only available since 4.0. You're apparently using PF 3.x. Look at the footer of the showcase site, it's currently saying that it's running PF 4.0. Just use widgetVar.show() , where widgetVar is the widget

sec:authorize doesn't work in spring security 3.2 and jsf

无人久伴 提交于 2019-12-19 05:33:24
问题 When I put some tags like this within my page: user and admin will display at runtime anyway? xmlns:sec="http://www.springframework.org/security/tags" spring-security-taglibs-3.2.3.RELEASE I have 2 folders(Admin and User) Also test with use-expressions="true" Did not the result! I used mysql table(users and user_roles) ... <sec:authorize access="ROLE_ADMIN"> <div> test Admin</div> </sec:authorize> <sec:authorize access="ROLE_USER"> <div> test User</div> </sec:authorize> or <sec:authorize

How to refresh page in JSF on selectOneMenu selection?

Deadly 提交于 2019-12-19 04:09:12
问题 I have a page containing a PrimeFaces (2.2.1) Editor component, a Refresh button and a selectOneMenu, whose selection affects the contents of the Editor, as follows: <p:editor id="uploadedText" value="#{facilityDataUploadBean.uploadedText}" width="600" height="180" disabled="true" controls="" /> <h:commandButton value="Refresh" immediate="true" /> <h:selectOneMenu id="skipLines" styleClass="dropdown" value="#{facilityDataUploadBean.skipLines}"> <f:selectItems value="#{facilityDataUploadBean

javax.el.PropertyNotFoundException: The class doesn't have property

烈酒焚心 提交于 2019-12-19 03:53:11
问题 I am failing to render data which is surely in a database. All my DAO methods working and tested. Perhaps it is not important but anyway: I am using Primefaces, Java ee 6, glassfish 3.1. Here is error: /edit.xhtml @59,45 value="#{b.orderNum}": The class 'com.boatmanagement.domain.BoatOrder' does not have the property 'orderNum'. My domain class. @Entity @Table(name="BOAT_ORDR_TB") public class BoatOrder implements Serializable { @Id @GeneratedValue @Column(name="ORDER_PK") private int orderId

How to implement row numbering into h:dataTable

早过忘川 提交于 2019-12-19 03:40:30
问题 I have this JSF table with pagination. <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <ui:insert name="header"> <ui:include src="header.xhtml"/> </ui:insert> <script type="text/javascript" src=

jsf 2.0 managed bean's property not found

不问归期 提交于 2019-12-19 03:36:39
问题 JSF error: /fstation/search.jspx(24,62) '#{vManager.fStations}' Property 'fStations' not found on type vm.beans.VisitorManagertype vManager is my managed been: search.jspx <h:form> <h:dataTable value="#{vManager.fStations}" var="row"> <h:column> <f:facet name="header"><h:outputText value="ID"/></f:facet> <h:outputText value="#{row.id}"/> </h:column> <h:column> <f:facet name="header"><h:outputText value="NAME"/></f:facet> <h:outputText value="#{row.name}"/> </h:column> </h:dataTable> </h:form>

How to stream a file download and display a JSF faces message?

蓝咒 提交于 2019-12-19 02:58:07
问题 We are streaming a binary file to our users, following the procedure elaborated in the SO question How to provide a file download from a JSF backing bean? In general the workflow works as intended, but during the generation of the export file recoverable errors may occur and we want to display these as a warning to the user. The file itself shall still be generated in that case. So we want that export to continue and display faces messages. Just to put emphasis on this: Yes, there is

JSF2 : inject service objects to managedbean from Spring?

爷,独闯天下 提交于 2019-12-19 02:29:27
问题 I have tested this, trying to inject an service object to a @ManagedBean, but it failed with a nullpointerexception, being the userService is null. I am currently using Tomcat 7, JSF 2, and here are some of my pom.xml <properties> <java-version>1.6</java-version> <org.springframework-version>3.0.3.RELEASE</org.springframework-version> <org.hibernate-version>3.6.0.Final</org.hibernate-version> .... </properties> Here is the exception trace : javax.faces.el.EvaluationException: java.lang

JSF2 : inject service objects to managedbean from Spring?

徘徊边缘 提交于 2019-12-19 02:29:00
问题 I have tested this, trying to inject an service object to a @ManagedBean, but it failed with a nullpointerexception, being the userService is null. I am currently using Tomcat 7, JSF 2, and here are some of my pom.xml <properties> <java-version>1.6</java-version> <org.springframework-version>3.0.3.RELEASE</org.springframework-version> <org.hibernate-version>3.6.0.Final</org.hibernate-version> .... </properties> Here is the exception trace : javax.faces.el.EvaluationException: java.lang