jsf-2.2

CellEdit event not working after cell edit in primefaces

廉价感情. 提交于 2019-12-05 09:24:58
I am trying to make an Editable DataTable by cell in Primefaces, but after an edit of a cell, the event not submitted and my code can't detect the newValue, and there is no error or log in the stack trace here is my code: xhtml: <p:dataTable id="ListC" value="#{recruitmentProcessMB.candidateListInProcess}" var="candid" rowKey="#{candid.idCandidate}" style="border:0px; " editable="true" editMode="cell"> <p:ajax event="cellEdit" update="ListC" listener="#{recruitmentProcessMB.onCellEdit}" /> <p:column headerText="Date d'entretien"> <p:cellEditor> <f:facet name="output"> <h:outputText value="#

fileUpload doesn't fire event in PrimeFaces 3.5 with JSF 2.2

梦想的初衷 提交于 2019-12-05 06:37:47
I can't make fileUpload component on PrimeFaces 3.5 to fire the event. I have read many posts about that topic and followed advise there but still it doesn't work. I tried all of the modes (simple, auto, advanced) with no success. If I use standard inputFile tag from the JSF specification it works properly. This is my web.xml file: <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">

p:fileUpload required=“true” and custom validator doesn't work [duplicate]

本秂侑毒 提交于 2019-12-05 04:30:19
This question already has answers here : PrimeFaces <p:fileUpload mode=“advanced”> validator not fired (2 answers) Closed 9 days ago . Since the required attribute of <p:fileUpload> still doesn't seem to work in PrimeFaces 4.0 final, I have tried to create a custom validator as follows. @FacesValidator(value="fileUploadValidator") public final class FileUploadValidator implements Validator { @Override public void validate(FacesContext fc, UIComponent uic, Object o) throws ValidatorException { System.out.println("fileUploadValidator called."); if(!(o instanceof UploadedFile)) { FacesMessage

Can a faces flow be started from within a Servlet?

纵然是瞬间 提交于 2019-12-05 04:23:37
问题 I have a service, accessed by a servlet, which redirects the user to a login screen. The backing beans' scope is currently being changed from @ConversationScoped to @FlowScoped, as it's easier to handle. Is there a way to initialize a faces flow directly from within a servlet, without the indirection through an implicit action or a JSF forward/redirect? I am aware that @FlowScope is a JSF (2.2) scope and I was wondering if there might be a way to e.g. extend the FacesServlet or something

DataTable .filter() and clearFilters() hides messages p:messages and p:growl

不打扰是莪最后的温柔 提交于 2019-12-05 01:44:03
问题 My issue when I use: <p:growl id="growl" autoUpdate="true" /> or <p:messages id="messages" autoUpdate="true" /> When I have error message, and once I use clear filters or re filter for primefaces datatable like : <p:commandButton value="do somthing and re-filter" oncomplete="PF('testTable').filter()"/> <p:commandButton value="do somthing and clear filter" oncomplete="PF('testTable').clearFilters()"/> <p:dataTable id="table" widgetVar="testTable" value="#{myMB.data}"> </p:dataTable> The

How to override primefaces component api class with custom class

青春壹個敷衍的年華 提交于 2019-12-04 21:48:32
I am facing the duplicate ids for columns issue in p:treeTable i.e. same problem as described in the below link http://forum.primefaces.org/viewtopic.php?f=3&t=31158&p=99463#p99463 So I would like to implement the solution as suggested in the above solution. So I thought of changing the source code and recompile and use the jar but I haven't got permission to do the same. I was asked to customise the class by extending the org.primefaces.component.api.UITree class or somehow without changing the actual class in primefaces jar. So now assume I have created a class with same name UITree and made

BarChart Graphic in PrimeFaces are not Displayed JSF 2.2

霸气de小男生 提交于 2019-12-04 20:47:11
i am using primefaces 4.0 and i am trying to do a Bar-chart, the code compile without error but the chart is not showing in the generate page. Managed Bean: package per.vmonsanto.controladores; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import org.primefaces.model.chart.CartesianChartModel; import org.primefaces.model.chart.ChartSeries; @ManagedBean @SessionScoped public class DashBoardBean { private CartesianChartModel categoryModel; /** * Creates a new instance of DashBoardBean */ public DashBoardBean() { createCategoryModel(); } public CartesianChartModel

Seam in JSF 2.2 causes java.lang.NullPointerException at com.sun.faces.application.NavigationHandlerImpl.determineViewFromActionOutcome

和自甴很熟 提交于 2019-12-04 18:40:39
I am trying to run my application on WildFly8.2, which was build by using Jboss 5.1.I migrated my entire application and able to see the login page. But while navigating to JSF pages, it is throwing the below exception. My old application is build on JSF 1.2 2015-07-15 14:49:02,108 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Initializing Mojarra 2.2.8-jbossorg-1 20140822-1131 for context '/booking' 2015-07-15 14:49:03,303 INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) JBAS017534: Registered web context: /booking 2015-07-15 14:49:03,402 INFO

Sharing components between views - how to improve my design?

你离开我真会死。 提交于 2019-12-04 13:01:51
I'm working on a JSF webapp which purpose is to wrap a command-line program. One of its main functionality is the ability to share a session between users (eg. for courses purpose), so that when an input is sent to an instance of the application, the output sent to every subscriber for this session. As a result of this design, the webapp is mainly composed of a view-scoped bean which will request a controller of the command-line application. It has also been chosen to identify a session with the URL fragment (eg. mydomain/myapp/#SESSIONID), so that anyone using the URL with the same fragment

CommandLink not Working on a Lazy Loaded Primefaces Datascroller

送分小仙女□ 提交于 2019-12-04 12:35:33
问题 I'm having an issue with lazy loading a Primefaces Datascroller component. I have a jsf page that should display 10 events on page load. If the user wants to see more he/she can click the more button to load and display the 10 next events. For each of the event rows, there is a link that can be used to display the event's details. <h:form id="mainForm" > <p:dataScroller value="#{backing.lazyModel}" var="event" lazy="true" chunkSize="10" rowIndexVar="index"> #{event.name} <p:commandLink class=