primefaces

p:commandButton not working inside c:forEach [duplicate]

烂漫一生 提交于 2019-12-29 08:17:05
问题 This question already has answers here : commandButton/commandLink/ajax action/listener method not invoked or input value not set/updated (12 answers) Closed 4 years ago . i am trying to use p:commandButton inside c:forEach tag but this commandButton not invoked: <c:forEach items="#{carnetOrdreBean.selectedOrdreList}" var="ordre"> <p:commandButton action="#{carnetOrdreBean.annulerOrdreChoisi}" value="Annuler" rendered="#{ordre.voirAnnulerOuNon}"> <f:setPropertyActionListener value="#{ordre}"

Components are with the same id inside ui:repeat

假装没事ソ 提交于 2019-12-29 07:53:04
问题 Unfortunately, primefaces accordionPanel doesn't works well in version 2.2.1 if you are trying to create tabs dynamically. This is my case, I need to create accordions if the user clicks an add icon, and remove if he clicks on x icon. No problem, I've created my own composite component, like you can see here: <c:interface> <c:attribute name="titulo" default="" required="false" /> <c:attribute name="renderizar" default="true" required="false" /> <c:attribute name="width" required="false"

ajaxStatus for specific component only

拜拜、爱过 提交于 2019-12-29 07:33:06
问题 I'm using Primefaces 3.2 with JSF 2.0. I'm using a <p:commandButton action="#{myBackingBean.action}" value="press me" /> And this for ajaxStatus: <p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();" rendered="#{myBackingBean.ajaxStatusRendered}" id="ajaxStatusField" /> <p:dialog modal="true" widgetVar="statusDialog" header="#{myBackingBean.ajaxStatusHeader}" rendered="#{myBackingBean.ajaxStatusRendered}" id="ajaxPanel" draggable="false" closable="false"> <p

Pass parameter to dialog in the same page

◇◆丶佛笑我妖孽 提交于 2019-12-29 07:25:27
问题 I have a page contains a form and other form nested in a dialog. I need to pass parameter to dialog when button clicked in the main form <h:form> <p:dataTable var="form" value="#{myBean.formList}"> <p:commandButton id="selectProduct" update="selectProductForm" oncomplete="selectProductDlg.show()" image="ui-icon-" > <f:param name="formId" value="#{form.id}" /> </p:commandButton> </p:dataTable> </h:form> <p:dialog> ...<h:form> <p:commandButton action="#{myBean.setSelected}" update="main_form"

Illegal Syntax for Set Operation: How to tell JSF I don't “want” a setter

ε祈祈猫儿з 提交于 2019-12-29 06:52:26
问题 This question may be more of the type "conceptual" or "I don't understand JSF". My scenario: I have a JSF Page ( index.xhtml ) where I use a p:accordionPanel (but I don't think it matters what component it is). What I want to do is to set the activeIndexes of it. <p:accordionPanel multiple="true" activeIndex="#{myController.getActiveIndexesForSections('whatever')}"> // bla bla... </p:accordionPanel> And the (simplified) method in the backing bean: public String getActiveIndexesForSections

Unable to understand <h:head> behaviour

左心房为你撑大大i 提交于 2019-12-29 02:00:07
问题 I have a template composition Button.xhtml which contains a <p:commandLink> : <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <p:commandLink value="View" action="#{printClass.printPdf}"/> </ui:composition> The link's purpose is to generate PDF. I have a template client defaultPage.xhtml where the Button.xhtml is been included. <ui

How to clear out and reuse p:dialog when adding new items

China☆狼群 提交于 2019-12-28 13:56:28
问题 I am using <p:dialog> to add a new row to <p:dataTable> taking input from user, but I am unable to reset it. Everytime it shows data of previous input and instead of adding it's editing the current row. How do I clear the fields? <h:form id="foodTableForm"> <p:dataTable id="foodTableId" var="v" value="#{dashboardBean.myFoodList}" editable="true"> <p:ajax event="rowEdit" listener="#{dashboardBean.onEdit}" /> <p:ajax event="rowEditCancel" listener="#{dashboardBean.onCancel}" /> <p:column sortBy

Primefaces datatable date range filter with filterFunction

≯℡__Kan透↙ 提交于 2019-12-28 11:57:47
问题 I use filterFunction method of datatable on primefaces 5.0. I want to filter birthday by date range on column header. On browser console I receive this error: <?xml version="1.0" encoding="utf-8"?><partial-response><error><error-name>java.lang.ClassCastException</error-name><error-message><![CDATA[javax.faces.component.UIPanel cannot be cast to javax.faces.component.ValueHolder]]></error-message></error></partial-response> Datatable : <p:dataTable var="person" value="#{testDateRange.persons}"

Displaying Hashmap keys and values in a primefaces DataTable

℡╲_俬逩灬. 提交于 2019-12-28 11:53:17
问题 I'm trying to display a Hashmap in a DataTable, here's what i'm trying to do : I'll have a select menu of some products, and an input text for quantity, an "ajaxified" add button that adds the product and its quantity to the map, and a submit button that displays a summary dialog containing a DataTable with two columns : Product Name and Quantitiy. my Hashmap is Map<Product,Integer> myMap = new HashMap<Product,Integer>(); for the ajaxified button and all those first steps, they're working for

JSF - actionListener tag calls method which doesn't take an ActionEvent parameter

时间秒杀一切 提交于 2019-12-28 07:05:07
问题 I keep reading posts which say that ActionListener methods must have the following signiture: public void calledByActionListener(ActionEvent e) { } Invoked like so: <p:commandButton value="Example" id="example" process="@this" ajax="false" actionListener="#{exampleBean.calledByActionListener()}"> However I have a no-arg method like this which works: public void calledByActionListener() { } Did something change? 回答1: Yes, that's the new EL 2.2 feature of invoking methods with custom arguments.