primefaces

Primefaces datatable update in f:facet name=“header” not working

隐身守侯 提交于 2020-07-23 17:25:38
问题 I want to update a button in the header facet of a primefaces datatable and it does not work. I copied the button outside the datatable everything works fine. The update should happen when the filter event of the datatable gets fired. I explicitly update the datatable, the outside- and the inside-button. The intention is to display a button with an icon when no filter is set and another icon when a filter is used. In this example I simplyfied the use case: when no filter is used there is a

How to restrict Primefaces inputMask to numbers only?

夙愿已清 提交于 2020-07-17 10:06:53
问题 I want to restrict p:inputMask to numbers only , and I tried the proposed solutions from: How to restrict an input to numbers only with PrimeFaces inputMask element But none of them worked. I tried these two ways: <p:inputMask id="userNo" maxlength="2" mask="9?9999" /> and <p:inputMask id="userNo" maxlength="2" > <pe:keyFilter regEx="/[0-9_]/i"/> </p:inputMask> 回答1: I think that approach is right but I noticed that you don't put value attribute on inputMask . Do you try to put it on? Edit:

Spring Security 4 and PrimeFaces 5 AJAX request handling

帅比萌擦擦* 提交于 2020-07-14 09:48:49
问题 Good Day. I've created a PrimeFaces 5 project (JSF 2.2) which makes use of Spring Security 4. I'm attempting to make use of p:dataTable control with single selection enabled, which through an ajax call, updates a p:pickList control. The problem is related with Spring Security. If I deactivate the security of the page where my page controls are located (admin.faces), the ajax behavior works fine. But if I activate security, I get 403 status codes and the pickList doesn't get updated. I must

Spring Security 4 and PrimeFaces 5 AJAX request handling

橙三吉。 提交于 2020-07-14 09:48:08
问题 Good Day. I've created a PrimeFaces 5 project (JSF 2.2) which makes use of Spring Security 4. I'm attempting to make use of p:dataTable control with single selection enabled, which through an ajax call, updates a p:pickList control. The problem is related with Spring Security. If I deactivate the security of the page where my page controls are located (admin.faces), the ajax behavior works fine. But if I activate security, I get 403 status codes and the pickList doesn't get updated. I must

call a custom listener for cancel in p:rowEditor

﹥>﹥吖頭↗ 提交于 2020-07-10 15:04:44
问题 I have been trying to call a custom listener when the cancel button is clicked in the primefaces rowEditor component. But I am not able to find the correct attribute to do this. The problem with the cancel button is that it works fine when the row is already present in the dataTable, if I try to add a new row dynamically to the dataTable and click on the cancel button [ if I think that it is not required ], the empty row is shown in the dataTable, when the empty row should be deleted. Would

call a custom listener for cancel in p:rowEditor

做~自己de王妃 提交于 2020-07-10 15:02:43
问题 I have been trying to call a custom listener when the cancel button is clicked in the primefaces rowEditor component. But I am not able to find the correct attribute to do this. The problem with the cancel button is that it works fine when the row is already present in the dataTable, if I try to add a new row dynamically to the dataTable and click on the cancel button [ if I think that it is not required ], the empty row is shown in the dataTable, when the empty row should be deleted. Would

p:remoteCommand inside iterating component like p:dataTable only works for last row

孤者浪人 提交于 2020-07-09 05:51:07
问题 i was trying to print the value entered in the inputText but it only shows 0 except for the last row it shows the right value! here's a minimal code (i didn't include all the fields and the getters/setters) @ManagedBean(name="medicament") @ViewScoped public class MedicamentBean { private List<Medicament> medicaments; private String libelle; private int qte_vente; public void test() { System.out.println(this.qte_vente); } } html: <h:form> <p:dataTable value ="#{medicament.medicaments}" var ="m

Mixing static and dynamic menu entries in PrimeFaces menu components

大兔子大兔子 提交于 2020-06-17 03:17:23
问题 I'd like to keep a part of my menu static in markup, and have another part dynamically generated in Java. <p:menubar> <p:menuitem value="static stuff"/> <p:submenu label="dynamic stuff" model="#{bean.dynamicMenu}"/> <!-- more static stuff --> </p:menubar> This shows only the static items and never calls my getDynamicMenu method cause p:submenu does not take a model attribute. I tried using ui:include within the menu structure to move the markup in an extra file and include that in different

Mixing static and dynamic menu entries in PrimeFaces menu components

≯℡__Kan透↙ 提交于 2020-06-17 03:16:28
问题 I'd like to keep a part of my menu static in markup, and have another part dynamically generated in Java. <p:menubar> <p:menuitem value="static stuff"/> <p:submenu label="dynamic stuff" model="#{bean.dynamicMenu}"/> <!-- more static stuff --> </p:menubar> This shows only the static items and never calls my getDynamicMenu method cause p:submenu does not take a model attribute. I tried using ui:include within the menu structure to move the markup in an extra file and include that in different

primefaces lazy loading is not implemented

若如初见. 提交于 2020-06-12 06:14:08
问题 I am getting "java.lang.UnsupportedOperationException: Lazy loading is not implemented." error. When i degub the project, lazyModel's constructor is working but load method is not executed. my xhtml page; <p:dataTable id="envelopelistid" var="envelope" value="#{incomingEnvelopeListController.lazyEnvelopeDataModel}" selection="#{incomingEnvelopeListController.selectedEnvelope}" selectionMode="single" rowKey="#{envelope.instanceIdentifier}" sortMode="multiple" lazy="true" style="min-height: