primefaces

How to update a h:inputHidden with p:commandButton?

◇◆丶佛笑我妖孽 提交于 2019-12-24 03:34:29
问题 I writed an ajax request for any data. But the data don't work with h:inputHidden. I think it's a bug of Primefaces. But I don't know how to get the data now. code: <h:inputHidden id="buttonData" value="#{buttonDataBean.buttonData}" /> ... <p:commandButton id="getData" action="#{buttonAction.getButtonData}" update="buttonData" /> When I click the commandButton, the value of don't work. But if I use the h:outputText, it worked. My requirement: Before click the commandButton, I have create any

p:column header facet is not shown when rendered attribute is used on p:column

旧街凉风 提交于 2019-12-24 03:07:24
问题 I have a <p:dataTable> . I would like to render a <p:column> conditionally as follows: <p:dataTable value="#{abcList}" var="abc"> <p:column rendered="#{headerShow}"> <f:facet name="header"> <h:outputText value="header" /> </f:facet> <h:outputText value="#{abc.hijk}" /> </p:column> </p:dataTable> When #{headerShow} is false , then the column is hidden. When #{headerShow} is true , then the column is shown, but without header. When I hardcode rendered="true" , then the column is shown with

Detect when the multiupload primefaces componet ends all the uploads

若如初见. 提交于 2019-12-24 03:04:08
问题 I´m usig the jsf version 2.1 primefaces 5.1 and tomcat 7. I have to execute a managed bean method after the all the uploads has been succesfully in a multiple upload component, I used the onComplete atribute, but is executed after each upload. I need to do it after the all files upload was completed. How identify that? Thanks in advance for your time and answers PD I posted this question in the primefaces 1 forum but nobody answer. 回答1: This should work: <p:fileUpload ... oncomplete=

The prefix “pt” for attribute “pt:data-inset” associated with an element type “p:dataList” is not bound

可紊 提交于 2019-12-24 02:43:17
问题 I have following Primefaces page and controller. Page <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui" xmlns:pm="http://primefaces.org/mobile"> <f:view renderKitId="PRIMEFACES_MOBILE"/> <h:head> </h:head> <h:body id="body"> <pm:page id="page"> <pm:header title="MyProduct"> </pm:header> <pm:content id="content"> <p:dataList value="#{likeditems.likedItems}" var="item" pt

View Scoped Bean preRenderView method being called multiple times

老子叫甜甜 提交于 2019-12-24 01:53:16
问题 I have a problem with my Mojarra 2.1.6 web-application, I'm developing it using @ViewScoped managed beans and each bean is attached to an xhtml page. This page is receiving some view params and after initializing the bean in that way: <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:p="http://primefaces.org/ui" template

Default header p:media with pdf player

雨燕双飞 提交于 2019-12-24 01:24:16
问题 I'm programming a <p:lightBox> with a streamed <p:media> to preview external PDFs. It works fine but i'm getting a little handicap. When the pdf dialog is rendered it shows (on mouse over) one Header where it always display the same title: "dynamiccontent.properties". Is there an attribute or something that I can override to customize it? JSP code: <p:lightBox> <h:outputLink value="#" title="#{myDoc.fileName}"> <i class="fa fa-eye" aria-hidden="true"></i> </h:outputLink> <f:facet name="inline

dialog will not close primefaces

拜拜、爱过 提交于 2019-12-24 01:16:59
问题 I have a dialog on one of my pages. It opens fine. It works fine if you use the button on the page, it closes. However, if you try and "x" out of the dialog it will not close. I believe it is related to the fact that I have an input field on the dialog, but I am not sure. I apologize if this is a dupe, I could not find a similar post. <p:commandButton action="#{phoneListBean.debugger}" value="Merge Unqiue" onclick="mdlg.show();" update=":pmsg, :createNewPanel, :listform" /> <p:dialog id=

How to make one field from two required at least with JSF/Primefaces

自古美人都是妖i 提交于 2019-12-24 00:27:21
问题 I'm using primefaces with jsf and i want to make one of two fields required at least. that means that the error message will be displayed if this two fields are empties togheter: this is a sample of my code: <h:outputLabel for="srcNumber" value="Originator MSISDN (EXAMPLE 32495959595)" /> <p:inputText id="srcNumber" value="#{cdrMmscRecBean.srcNumber}" label="srcNumber" /> <h:outputLabel for="destNumber" value="Destination MSISDN (EXAMPLE 32495959595)" /> <p:inputText id="destNumber" value="#

Primefaces Dialog Framework — dialogReturn event from menuitem

六眼飞鱼酱① 提交于 2019-12-24 00:19:56
问题 I have a primefaces p:datatable in Table.xhtml and have a p:commandbutton on the same page which I am using to open a dialog using dialog framework. The content related to dialog is in Dialog.xhtml . I am using a single backing bean named TableDialog.java for both Table.xhtml and Dialog.xhtml . When the dialog is closed, the values in the p:datatable are updated accordingly using the <p:ajax event="dialogReturn" listener="#{tableDialog.test}" update = ":form:colors" /> The Table.xhtml is as

Primefaces :radioButton inside a ui:repeat

扶醉桌前 提交于 2019-12-24 00:15:20
问题 This is my xhtml code : <?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="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui"> <h:head> <title>Custom Radio Test</title> </h:head> <h:body> <h:form id="mF" > <p:selectOneRadio id=