jsf

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

Why does the first AJAX call reset my view parameter?

那年仲夏 提交于 2020-05-29 08:43:53
问题 I cannot find out why the first ajax call causes the setter of my view parameter to be called again while every subsequent call does not call the setter again. I have the following simple view bean: package test; import java.io.Serializable; import javax.faces.view.ViewScoped; import javax.inject.Named; @Named @ViewScoped public class TestController implements Serializable { private static final long serialVersionUID = 1L; String param; public String getParam() { return param; } public void

Why does the first AJAX call reset my view parameter?

泄露秘密 提交于 2020-05-29 08:39:33
问题 I cannot find out why the first ajax call causes the setter of my view parameter to be called again while every subsequent call does not call the setter again. I have the following simple view bean: package test; import java.io.Serializable; import javax.faces.view.ViewScoped; import javax.inject.Named; @Named @ViewScoped public class TestController implements Serializable { private static final long serialVersionUID = 1L; String param; public String getParam() { return param; } public void

Why does the first AJAX call reset my view parameter?

巧了我就是萌 提交于 2020-05-29 08:39:18
问题 I cannot find out why the first ajax call causes the setter of my view parameter to be called again while every subsequent call does not call the setter again. I have the following simple view bean: package test; import java.io.Serializable; import javax.faces.view.ViewScoped; import javax.inject.Named; @Named @ViewScoped public class TestController implements Serializable { private static final long serialVersionUID = 1L; String param; public String getParam() { return param; } public void

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=

Make multiple dependent / cascading selection components in JSF

自闭症网瘾萝莉.ら 提交于 2020-05-24 07:06:08
问题 I am trying to make 4 dependent / cascading selection components. In this question, the selection component happens to be a <h:selectOneMenu> , but this is of course applicable on any other kind of selection component, such as <h:selectManyCheckbox> , <p:selectCheckboxMenu> , etc. When the user chooses an item from the first menu, the second menu will show dependent data and when the user chooses item from the second one , the third one will show dependent data and so on. The user will see

Make multiple dependent / cascading selection components in JSF

99封情书 提交于 2020-05-24 07:06:06
问题 I am trying to make 4 dependent / cascading selection components. In this question, the selection component happens to be a <h:selectOneMenu> , but this is of course applicable on any other kind of selection component, such as <h:selectManyCheckbox> , <p:selectCheckboxMenu> , etc. When the user chooses an item from the first menu, the second menu will show dependent data and when the user chooses item from the second one , the third one will show dependent data and so on. The user will see

How to collect submitted values of a List<T> in JSF?

爱⌒轻易说出口 提交于 2020-05-23 17:33:43
问题 I have a bean with a List<T> : @Named @ViewScoped public class Bean { private List<Item> items; private String value; @Inject private ItemService itemService; @PostConstruct public void init() { items = itemService.list(); } public void submit() { System.out.println("Submitted value: " + value); } public List<Item> getItems() { return items; } } And I'd like to edit the value property of every item: <h:form> <ui:repeat value="#{bean.items}" var="item"> <h:inputText value="#{bean.value}" /> <

JSF execute javascript after f:ajax

时间秒杀一切 提交于 2020-05-23 08:05:11
问题 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=