primefaces

JSF/PrimeFaces: Issue in pages with a layout

青春壹個敷衍的年華 提交于 2019-12-24 09:26:35
问题 I have a problem with my JSF page which uses PrimeFaces components. As it may get long and boring quickly, I try to be as brief as possible. Consider this managed bean: @Named(value = "testBean") @RequestScoped public class TestBean implements Serializable { private String test; public String update() { test = "Updated."; return "test"; } // Getters and Setters... } Here's the body of test.xhtml , with irrelevant content and styles removed: <h:body> <p:layout id="layout" fullPage="true"> <p

How to hide time-slots in “agendaWeek” View of FullCalendar/Primefaces <p:schedule>?

a 夏天 提交于 2019-12-24 09:19:11
问题 Is it possible to hide the time-slots in "agendaWeek" View? I'm using Primefaces <p:schedule> which based on the FullCalendar. I only add AllDay-Events to this specfic schedule, so my client decided to hide the time-slots. I hope there is a way. Best regards 回答1: not sure if that's what you mean but to hide the first column in schedule try this css selector (remove formID\3A if you got prependId = "false" in your form that contains the scheduler ) #formID\3A scheduleID th.fc-agenda-axis{

Setting two p:selectOneMenu s

你。 提交于 2019-12-24 09:16:21
问题 I need to use two primefaces selectonmenus to my web page. My second selectonmenu works when it has static data all data can view in button click after press the button But it not work with dynamic data data get load to this after selecting a value from 1st selectonmenu using an ajax data load to this selectonmenu but it always show null value after select a value from this this the code for point 1 <p:tab id="create_Subnet_T" title="Create subnet"> <h:form id="create_Subnet"> <h:panelGrid

primefaces 3.5 uploadfile not working, i using netbean 7.2.1

邮差的信 提交于 2019-12-24 09:13:02
问题 the problem is with file uploader from primefaces web.xml <filter> <filter-name>PrimeFaces FileUpload Filter</filter-name> <filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class> </filter> <filter-mapping> <filter-name>PrimeFaces FileUpload Filter</filter-name> <servlet-name>Faces Servlet</servlet-name> </filter-mapping> .xhtml </h:form> ... </h:form> <h:form enctype="multipart/form-data"> <p:fileUpload value="#{contratosMB.fileContrato}" mode="simple"/> <p:commandButton

Upload file in JSF primefaces

末鹿安然 提交于 2019-12-24 08:36:28
问题 I'm trying to upload a file with a simple form but it just returns to the same page all the time. To find the mistake or whatever is wrong, I just want to write in the output the name of the file I upload. Once I can get the file name I guess I can handle how to handle the entire file. So this is my code: <h:form enctype="multipart/form-data"> <h:outputText value="Argazkia: "/> <p:fileUpload value="#{jokoBerriaController.file}" mode="simple"/> <p:commandButton value="Bidali" ajax="false"

How can I compile a primefaces source?

喜欢而已 提交于 2019-12-24 08:34:43
问题 In the download section of primefaces there are 3 links: binary bundle sources I use primefaces 3.4.2 and would like to recompile one java class to fulfill my needs. I downloaded the sources. Now I would like to recompile this class, but I don't know how to achieve that. How can I compile a primefaces source? 回答1: Checkout sources from repo. It is maven project, so build it with maven. 回答2: From primefaces site: http://code.google.com/p/primefaces/wiki/BuildingFromSource PrimeFaces uses maven

Primefaces chart memory leak when refreshing with poll component

ぃ、小莉子 提交于 2019-12-24 08:19:11
问题 I have 10 charts in my page and I refresh them using poll component every 1 minute. But after one hour i see that firefox and chrome got more that 1 GB of memory and sometimes even firefox crashes. Is this a memory leak caused by primefaces chart? How can I solve the problem? Here is the source code for my example application: In this code interval is set to 3 seconds to see the problem sooner! <h:body> <h:form id="timerForm"> <p:poll interval="3" widgetVar="timer" update=":chartPanel"

How to display pdf on JSF

☆樱花仙子☆ 提交于 2019-12-24 08:08:01
问题 Hi my code is as follows: public StreamedContent getTempPdfFile() throws IOException { File testPdfFile = new File("D:\\AFC150_20180819_0103.pdf"); streamedContent = new DefaultStreamedContent(new FileInputStream(testPdfFile), "application/pdf", "AFC150_20180819_0103.pdf"); return streamedContent; } <h:panelGrid columns="1" cellpadding="5"> <p:media value="#{realReport.tempPdfFile}" player="pdf" width="1000px" height="300px"> <f:param name="id" /> </p:media> </h:panelGrid> But the PDF file is

Update of a conditionally rendered selectItem not working

丶灬走出姿态 提交于 2019-12-24 08:00:39
问题 I'm wondering why updating a form won't update a conditionally rendered selectItem. The commandButton (for testing purposes) is updated correctly as expected. <h:form id="form"> <h:selectOneMenu id="selectedGroupId" label="#{msgs.group_group}" value="#{groupBean.selectedGroupId}"> <p:ajax event="change" listener="#{groupBean.selectGroupEvent}" update=":form"/> <f:selectItem rendered="#{empty groupBean.selectedGroupId}" itemLabel="#{msgs.global_select_select}" /> <f:selectItems value="#

Change Primefaces p:steps activeIndex with Javascript?

本小妞迷上赌 提交于 2019-12-24 07:59:54
问题 I'm considering using the p:steps component <p:steps activeIndex="1" styleClass="custom" readonly="false"> <p:menuitem value="Personal" url="#"/> <p:menuitem value="Seat Selection" url="#"/> <p:menuitem value="Payment" url="#"/> <p:menuitem value="Confirmation" url="#"/> </p:steps> how can I change activeIndex with Javascript? 回答1: Normally you should be able to do so using the JavaScript API and using the widgetVar attribute. However, when I use widgetVar="stepsVar" , the widget is unknown