jsf-2.2

Error in streaming dynamic resource. null

丶灬走出姿态 提交于 2019-12-03 07:39:53
Important Notice : This issue has been fixed as of PrimeFaces 5.2 final (Community Release) released on April 8, 2015. As such if you happened to use that version or newer, you would not need to fiddle around with a temporary workaround. The earlier given example can now safely be modified as follows. public StreamedContent getImage() throws IOException { FacesContext context = FacesContext.getCurrentInstance(); if (context.getCurrentPhaseId() == PhaseId.RENDER_RESPONSE) { return new DefaultStreamedContent(); } else { String id = context.getExternalContext().getRequestParameterMap().get("id");

Primefaces Datatable (date column) Filter by calendar

可紊 提交于 2019-12-03 03:53:17
I am using PF 5.1. I want to filter Primefaces datatable (date column) by calendar set primefaces calendar here . Is it possible ? -Please help anybody . stg For older PrimeFaces versions the solution has to be implemented like in this answer, for newe versions the other answer contains the solution. Basically, this can be achieved like this: use a hidden input field (like h:inputHidden ) in the filter facet to hide the default filter input field put a p:calendar in the header facet add a dateSelect event onto your calendar. In onstart replace the value of your hidden input by the value of the

primefaces tabView different tab content with dynamic tabs

纵然是瞬间 提交于 2019-12-02 18:36:05
问题 I have a problem with tabView. The 1st tab should always display the same content (called search template which is identified with #{not curSearch.isClosable()}. All other tabs are search instances (identified with #{curSearch.isClosable()} Here is the code: <p:tabView id="searchTabViewId" var="curSearch" value="#{searchBL.searchInstances}" activeIndex="#{searchBL.activeTabIndex}" styleClass="searchTabView"> <!-- search template tab --> <ui:include src="/icarchive/sections/search

Referencing dataTable footer

萝らか妹 提交于 2019-12-02 13:26:23
问题 I am trying to use Ajax updates triggered from a component within a p:dataTable to update the footer of the table. But no matter how I write my ID references in the p:ajax tag I don't seem to be able to get them right. This is an example: <h:form id="formId"> <p:dataTable id="tableId" var="row" value="#{testBean.dataRows}" rowIndexVar="rowIx"> <p:column> <h:outputText value="#{row}"/> <p:inputText id="innerInputId" value="#{testBean.str}"> <p:ajax event="keyup" update="tableId:footerId"/> <p

Malsup's jQuery form plugin and JSF 2.2

一世执手 提交于 2019-12-02 12:30:12
Is it possible to use Malsup's plugin to upload files like this example using JSF 2.2 so I can use its progress bar? On html forms, it seems to work around the 'name' attribute from the <input type="file"> s, all 3 being "myfile[]" in the example. Unfortunately, its equivalent in jsf is <h:inputFile> , which doesn't have a name attribute. Well, <h:inputFile> can have an id and then its name will have the same value in the generated html, but since ids are unique, so will be their names. The thing is, I don't know how/if the names impact on how the plugin handles a submit with multiple inputs.

getting inputText on only the first row of a (Primefaces) dataTable, with dynamic columns and rows

被刻印的时光 ゝ 提交于 2019-12-02 11:32:46
问题 I have a Primefaces (5.0) Datatable with dynamic columns as well as dynamic rows. In brief, my problem is how do I set it up so that the cells of the first row are a series of inputText's or inputTextarea's, while the rows below the first are outputText? To elaborate, the xhtml (following BalusC's response to Creating and populating a DataTable dynamically in JSF2.0) is as follows: <p:dataTable var="rowMap" value="#{reviewController.rowMapList}" scrollable="true" scrollWidth="900px" > <p

Primefaces downloadFile java.io.IOException: Stream Closed after second time

跟風遠走 提交于 2019-12-02 10:20:28
问题 I have issue with primefaces 5.0 component p:fileDownload , I have following bean store DefaultStreamedContent , and I get the value stored to download it simply : Bean : public class EBMail implements Serializable { private DefaultStreamedContent attachment; // @ here setter and getter too . } and from XHTML file : <p:commandLink ajax="false" value="Download Attachment" rendered="#{mbMail.attachment != null}"> <p:fileDownload value="#{mbMail.attachment}" /> </p:commandLink> I get mail

primefaces tabView different tab content with dynamic tabs

核能气质少年 提交于 2019-12-02 10:08:12
I have a problem with tabView. The 1st tab should always display the same content (called search template which is identified with #{not curSearch.isClosable()}. All other tabs are search instances (identified with #{curSearch.isClosable()} Here is the code: <p:tabView id="searchTabViewId" var="curSearch" value="#{searchBL.searchInstances}" activeIndex="#{searchBL.activeTabIndex}" styleClass="searchTabView"> <!-- search template tab --> <ui:include src="/icarchive/sections/search/firstSearchTab.xhtml"> <ui:param name="curSearch" value="#{curSearch}" /> </ui:include> <!-- search instances tabs

Named object resource include not found - Omnifaces + JSF 2.2.12

▼魔方 西西 提交于 2019-12-02 09:54:33
问题 I have an issue with my JSF page since I've installed Mojorra version 2.2.12 (from 2.2.8): it throws an exception when the page is loaded. The exception is: Named object: org.omnifaces.component.output.ResourceInclude not found. I have the exact same issue with the Mojorra version 2.2.11. I don't have any problem with the version 2.2.8, 2.2.9, and 2.2.10. Environment: Tomcat 8 + omnifaces 1.11 + jsf 2.2.12 + richfaces 4.5.4.final. My JSF page includes a JSP fragment through the o

<f:facet> not working with <h:form>

心不动则不痛 提交于 2019-12-02 09:27:10
问题 I have a template, in which a <h:form> is defined. This <h:form> is used all over the application for the CRUD pages of entities. So, at one place I need another enctype for the form, so that I can upload files. I thought I can solve this with a facet in the template: <h:form id="main-form"> <f:facet name="enctype"> <ui:insert name="form-enctype"/> </f:facet> <ui:insert name="buttons"/><p/> <ui:insert name="content"/><p/> <ui:insert name="buttons"/> <ui:insert name="additionalHelper"/> </h