jsf

primefaces orderlist not getting updated with the changed order

ε祈祈猫儿з 提交于 2021-02-09 11:07:38
问题 I have a primefaces p:orderList which is displayed in a popup on click of a button. When I change the order of Items in the orderlist, and click on Save Order button on the popup, I'm not seeing the list with the changed order. PFB my code - <p:commandButton ajax="true" id="toolOrderButton" value="Tool Order" onclick="toolOrderPopup.show()" type="button"/> <p:dialog header="Tool Order" severity="alert" widgetVar="toolOrderPopup" appendToBody="true"> <p:orderList id="toolOrderList"

Understanding garbage collection in Java for objects managed by container

和自甴很熟 提交于 2021-02-09 02:54:53
问题 Lets say I have a managed bean called A that is @RequestScoped Let's say A has a reference to another managed bean B and B is declared to be @SessionScoped . Will the fact that A has a reference to another bean with longer scope prevent A from getting garbage collected at the end of the HttpRequest ? Will the situation change the other way around ie if B contains a reference to A ? if yes then why ? 回答1: Will the fact that A has a reference to another bean with longer scope prevent A from

Understanding garbage collection in Java for objects managed by container

荒凉一梦 提交于 2021-02-09 02:50:35
问题 Lets say I have a managed bean called A that is @RequestScoped Let's say A has a reference to another managed bean B and B is declared to be @SessionScoped . Will the fact that A has a reference to another bean with longer scope prevent A from getting garbage collected at the end of the HttpRequest ? Will the situation change the other way around ie if B contains a reference to A ? if yes then why ? 回答1: Will the fact that A has a reference to another bean with longer scope prevent A from

Understanding garbage collection in Java for objects managed by container

拜拜、爱过 提交于 2021-02-09 02:49:54
问题 Lets say I have a managed bean called A that is @RequestScoped Let's say A has a reference to another managed bean B and B is declared to be @SessionScoped . Will the fact that A has a reference to another bean with longer scope prevent A from getting garbage collected at the end of the HttpRequest ? Will the situation change the other way around ie if B contains a reference to A ? if yes then why ? 回答1: Will the fact that A has a reference to another bean with longer scope prevent A from

How do you update the page size of a PrimeFaces datatable dynamically?

霸气de小男生 提交于 2021-02-08 10:38:27
问题 I am trying to update the page size of a PrimeFaces datatable dynamically, after the datatable is displayed on the page but I can't seem to be able to do that. I am using a lazy loaded datatable if that matters... putting an EL expression in the rows attribute and doing a table refresh does not work and causes the paginator to return no data. Any ideas if this is a bug and how to fix it? Thanks 回答1: You need not refresh or update the datatable. Use EL expression in rowsPerPageTemplate

How do you update the page size of a PrimeFaces datatable dynamically?

偶尔善良 提交于 2021-02-08 10:38:21
问题 I am trying to update the page size of a PrimeFaces datatable dynamically, after the datatable is displayed on the page but I can't seem to be able to do that. I am using a lazy loaded datatable if that matters... putting an EL expression in the rows attribute and doing a table refresh does not work and causes the paginator to return no data. Any ideas if this is a bug and how to fix it? Thanks 回答1: You need not refresh or update the datatable. Use EL expression in rowsPerPageTemplate

How to set defalult selected items in selectOneRadio/selectCheckboxMenu by beans in primefaces

萝らか妹 提交于 2021-02-08 07:55:45
问题 I want to create selectOneRadio list and selectCheckboxMenu which items get from related bean objects. For non selected list it is working well.But how can i provide these lists with some item(s) selected by default. My current selectCheckboxMenu code is like this. <p:selectCheckboxMenu id="trdays" value="#{mybean.selectedDay}" label="Select Days"> <f:selectItems value="#{mybean.dayList}" var="day" itemValue="#{day.value}" itemLabel="#{day.name}"/> </p:selectCheckboxMenu> it should look like

bean validation (JSR 303) for primefaces not working

十年热恋 提交于 2021-02-08 06:52:39
问题 I'm using: Primefaces 6.1 JSF: 2.2.10 javax.validation:1.1.0.Final validator impl: hibernate-validator 5.0.1.Final GAE: 1.9.52 I follow the example for CSV (Client Side Validation) using backend bean from: https://www.primefaces.org/showcase/ui/csv/bean.xhtml The expected result should be: And what I get right now: The bean validation is not working. I have below configure in web.xml <context-param> <param-name>primefaces.CLIENT_SIDE_VALIDATION</param-name> <param-value>true</param-value> <

p:dialog not hidden on validation failure

拈花ヽ惹草 提交于 2021-02-08 06:34:24
问题 I am having a problem with not closing a PrimeFaces dialog. The input field 'username' is required: <p:outputLabel for="username" value="Username: "/> <p:inputText id="username" value="#{employeeController.employee.username}" required="true"/> I used the following code to prevent the dialog from closing if the field is empty: <p:commandButton value="Save" action="{employeeController.doSaveEmployee()}" oncomplete="if (args && !args.validationFailed) PF('employeeAddDialog').hide()" update="

JSF / primefaces eventing in diagram elements

允我心安 提交于 2021-02-08 06:15:07
问题 i need to access the data object of an org.primefaces.model.diagram.Element in a managedBean on click of this very element. I am using primefaces 5.2. I tried multiple ways to establish this, but none did work so far. Here is one approach: xhtml: the idea is, to pass the element through a commandLink action attribute (which works fine for e.g. data tables): <fl:composition template="/WEB-INF/template.xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:fl=