primefaces

Primefaces 5.1 calendar popup doesn't execute the valueChange event

半腔热情 提交于 2020-06-09 02:44:33
问题 I'm try to use the primefaces calendar with popup in this way: <p:calendar pattern="yyyy-MMM-dd" value="#{controller.beginDate}" mask="true" navigator="true"> <f:ajax event="valueChange" listener="#{controller.onChange}" /> </p:calendar> And here is the relative controller: @ManagedBean public class Controller { private Date beginDate; public Date getBeginDate() { return beginDate; } public void setBeginDate(Date beginDate) { this.beginDate = beginDate; } public void onChange() { // do

JSF without @ViewScoped

孤人 提交于 2020-06-08 04:14:19
问题 I've been using JSF for many years and in the next project we're aiming to make the web-tier as stateless as possible. One possibility I'm exploring is removing @ViewScoped beans in favour of @RequestScoped (plus one or two @SessionScoped beans as required). This is proving troublesome for complex pages with AJAX, datatables and conditional rendering. My question is: how well does JSF (and PrimeFaces) work with stateless web beans? Is this something that I should continue to explore, or is

p:keyFilter not working as expected in Firefox

自古美人都是妖i 提交于 2020-05-29 09:43:15
问题 I'm able to enter both the digits and special characters for the p input text. How to restrict the field that can accept only digits? in all the browsers? <p:message for="longitude" display="text"><p:autoUpdate/></p:message> <p:inputText id="longitude" maxlength="18" style="width: 50%;" value="#{areaMB.longitude}"> <p:keyFilter regEx="/[0-9]/i" /> </p:inputText> Browser Chrome Version 81.0.4044.113 (64-bit) - Only Digits are being able to enter in the field Browser IE Version 11.0.9600 - Only

p:keyFilter not working as expected in Firefox

让人想犯罪 __ 提交于 2020-05-29 09:42:10
问题 I'm able to enter both the digits and special characters for the p input text. How to restrict the field that can accept only digits? in all the browsers? <p:message for="longitude" display="text"><p:autoUpdate/></p:message> <p:inputText id="longitude" maxlength="18" style="width: 50%;" value="#{areaMB.longitude}"> <p:keyFilter regEx="/[0-9]/i" /> </p:inputText> Browser Chrome Version 81.0.4044.113 (64-bit) - Only Digits are being able to enter in the field Browser IE Version 11.0.9600 - Only

Label does not align when using long text on a p:selectOneRadio

三世轮回 提交于 2020-05-29 05:38:06
问题 I'm trying to implement a simple interface using JSF and primefaces. I need a list of questions and, for each question, the user will be able to choose between different options. These options are quite long and I have problem with the allignement of the radio button. The code for one of the questions is the following: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns=

Calling managed bean methods in JavaScript in with normal HTML button

£可爱£侵袭症+ 提交于 2020-05-27 06:25:11
问题 I need to call managed bean methods in JavaScript while clicking the normal HTML button. Is it possible to do that, provided that I use JSF2.x and Primefaces? 回答1: Yes, it is possible. Primefaces provides for a useful hook to do that with its component <p:remoteCommand>. It basically offers you with a javascript function that will be able to communicate with your bean. Basic usage example: The view: <p:remoteCommand name="remote" actionListener="#{bean.listener}" update="text"/> <h:outputText

How to get the event when prev,next are clicked : Schedule with primefaces

给你一囗甜甜゛ 提交于 2020-05-17 08:53:32
问题 I have added PrimeFaces schedule from this page and got the results like the following: I got the following events working fine but how do I get and handle events when prev or next is clicked? I have also highlighted some more in the image: <p:ajax event="dateSelect" listener="#{scheduleJava8View.onDateSelect}" update="eventDetails" oncomplete="PF('eventDialog').show();" /> <p:ajax event="eventSelect" listener="#{scheduleJava8View.onEventSelect}" update="eventDetails" oncomplete="PF(

IBM AppScan - Port Listener Command Injection - JSF 2.2 & Primefaces - JBOSS 7.2 EAP

别等时光非礼了梦想. 提交于 2020-05-17 08:49:22
问题 Orginal Post IBM AppScan We recently received result from IBM AppScan DAST and some of the result don't make much senses. Parameter: **javax.faces.source** Risk(s): It is possible to run remote commands on the web server. This usually means complete compromise of the server and its contents Fix: Set the "uri" attribute of the "domain" entity in the clientaccesspolicy.xml file to include specific domain names instead of any domain. The following changes were applied to the original request:

IBM AppScan - Java Deserialization Code Execution - JSF 2.2 & Primefaces - JBOSS 7.2 EAP

自作多情 提交于 2020-05-16 22:34:10
问题 Orginal Post IBM AppScan We recently received result from IBM AppScan DAST and some of the result don't make much senses. Java Deserialization Code Execution Parameter: **javax.faces.ViewState** Risk(s): It is possible to run remote commands on the web server. This usually means complete compromise of the server and its contents The following changes were applied to the original request: Set the value of the parameter 'javax.faces.ViewState' to XXX POST /**/processitem.xhtml HTTP/1.1 User

IBM AppScan - Blind SQL Injection (Time Based) - JSF 2.2 & Primefaces - JBOSS 7.2 EAP

五迷三道 提交于 2020-05-15 08:07:31
问题 Orginal Post IBM AppScan We recently received result from IBM AppScan DAST and some of the result don't make much senses. High -- Blind SQL Injection (Time Based) Parameter: form:propertyTree:0:j_idt126 Risk(s): It is possible to view, modify or delete database entries and tables Fix: Review possible solutions for hazardous character injection 2nd case for Blind SQL Injection (Time Based) URL: https://***/javax.faces.resource/components.js.xhtml Parameter: v Risk(s): It is possible to view,