jsf

JSF execute javascript after f:ajax

强颜欢笑 提交于 2020-05-23 08:05:09
问题 In my JSF 2 web application, I use the following code to display and switch the contents of a rich:dataTable according to the selectedStatus: <h:selectOneRadio id="statusSelection" value="#{backingBean.selectedStatus}" style="width:auto; float:left;"> <f:selectItem itemValue="AVAILABLE" itemLabel="Available" /> <f:selectItem itemValue="INACTIVE" itemLabel="Inactive" /> <f:ajax render="itemsDataTable" execute="#{backingBean.sortByTitel('ascending')}" /> <f:ajax render="itemsDataTable" event=

Problems with JSF 2.3, Weld CDI and Tomcat 9

旧街凉风 提交于 2020-05-17 13:16:42
问题 I have a maven project using JSF 2.3.9, Weld Servlet 3.1.1 and Tomcat 9. The project is configured as follows: pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>testmaven</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <name

Problems with JSF 2.3, Weld CDI and Tomcat 9

三世轮回 提交于 2020-05-17 13:14:08
问题 I have a maven project using JSF 2.3.9, Weld Servlet 3.1.1 and Tomcat 9. The project is configured as follows: pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.example</groupId> <artifactId>testmaven</artifactId> <version>1.0-SNAPSHOT</version> <packaging>war</packaging> <name

Cross Site Request Forgery prevention via 'Referer' header

隐身守侯 提交于 2020-05-15 06:26:12
问题 We recently received result from IBM AppScan DAST and some of the result don't make much senses. 2.Medium -- Cross-Site Request Forgery Risk(s): It may be possible to steal or manipulate customer session and cookies, which might be used to impersonate a legitimate user, allowing the hacker to view or alter user records, and to perform transactions as that user Fix: Validate the value of the "Referer" header, and use a one-time-nonce for each submitted form The following changes were applied

Cross Site Request Forgery prevention via 'Referer' header

試著忘記壹切 提交于 2020-05-15 06:25:07
问题 We recently received result from IBM AppScan DAST and some of the result don't make much senses. 2.Medium -- Cross-Site Request Forgery Risk(s): It may be possible to steal or manipulate customer session and cookies, which might be used to impersonate a legitimate user, allowing the hacker to view or alter user records, and to perform transactions as that user Fix: Validate the value of the "Referer" header, and use a one-time-nonce for each submitted form The following changes were applied

p:messages displays but disapear almost instantly

China☆狼群 提交于 2020-05-15 04:50:05
问题 i have a strange problem with a p:message tag. On page a have a dataTable with data from my db that i can edit in a p:dialog. Once all validations succeds and the update in db is done i refresh the dataTable and add a faces message info to display the succes of the operation. In the front-end i update the form whom contains both the dataTable and the dialog. My problem is that the message is displayed but almost instantly disapears. It's like the message tag is updated with the form. I don't

Format to number with comma JSF

别说谁变了你拦得住时间么 提交于 2020-05-13 19:15:33
问题 How I can format a value in JSF <h:outputText value="#{MyVM.number}"> <f:convertNumber pattern="#0,000.000" /> </h:outputText> I need format a number like: 12345.67 to 12,345.67 Is possible with pattern? 回答1: Try to use: <f:convertNumber groupingUsed="true" maxFractionDigits="2" /> 来源: https://stackoverflow.com/questions/23313080/format-to-number-with-comma-jsf

Format to number with comma JSF

杀马特。学长 韩版系。学妹 提交于 2020-05-13 19:15:10
问题 How I can format a value in JSF <h:outputText value="#{MyVM.number}"> <f:convertNumber pattern="#0,000.000" /> </h:outputText> I need format a number like: 12345.67 to 12,345.67 Is possible with pattern? 回答1: Try to use: <f:convertNumber groupingUsed="true" maxFractionDigits="2" /> 来源: https://stackoverflow.com/questions/23313080/format-to-number-with-comma-jsf

Primefaces - update datatable with commandButton doesn't work

那年仲夏 提交于 2020-05-12 22:27:59
问题 I'm facing some problems by updating a datatable with a commandButton. This is the xhtml file: <div class="grid_16"> <h:form id="list"> <p:messages></p:messages> <p:dataTable styleClass="result-table" var="user" id="usersList" value="#{listUsersController.users}" widgetVar="userTable" paginator="true" rows="10" paginatorAlwaysVisible="false"> <f:facet name="header"> Listado de usuarios </f:facet> <p:column> <f:facet name="header"> <h:outputText value="#{cms['users.username']}" /> </f:facet> #

Primefaces - update datatable with commandButton doesn't work

半世苍凉 提交于 2020-05-12 22:26:43
问题 I'm facing some problems by updating a datatable with a commandButton. This is the xhtml file: <div class="grid_16"> <h:form id="list"> <p:messages></p:messages> <p:dataTable styleClass="result-table" var="user" id="usersList" value="#{listUsersController.users}" widgetVar="userTable" paginator="true" rows="10" paginatorAlwaysVisible="false"> <f:facet name="header"> Listado de usuarios </f:facet> <p:column> <f:facet name="header"> <h:outputText value="#{cms['users.username']}" /> </f:facet> #