primefaces

parsing the JSON structure with backslash

删除回忆录丶 提交于 2020-01-06 06:58:50
问题 The front end recieves the json output in the following format (with a backslash before the double quote). We didn't intentionally put the backspace but Primefaces(JSF) does when sending the output to front end. How to parse this and save it in an array using jquery or javascript? We don't want the backslash added by primefaces at all, if there is way we can do from the server side (Primefaces) please let me know. We can remove the "\" using some function in javascript but then it may remove

confirmDialog appears but disappears immediately

随声附和 提交于 2020-01-06 06:55:58
问题 I have read similar questions on SA and the Primefaces forum but it did not help. Here is the xhtml: <h:form id="form2" prependId="false"> <p:remoteCommand name="sendNameClicked" actionListener="#{reportBean.passName}"/> <p:remoteCommand name="updateDialog" update=":form3:dialogBox"/> <p:commandButton style="display: none" id="displayDialog" type="button" onclick="cd.show(); return false;"/> </h:form> <h:form id="form3"> <p:confirmDialog id ="dialogBox" message= "#{reportBean

Generating Histogram through Java and PrimeFaces

一曲冷凌霜 提交于 2020-01-06 05:38:21
问题 I am having trouble in generating histogram through java prime faces.I have this xhtml file. <!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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <ui:define name="content"> <h1 class="title ui-widget-header ui-corner-all"

Jboss Error picklist render using showcase

Deadly 提交于 2020-01-06 04:29:07
问题 related links: PrimeFaces PickList with OmniFaces validateAll leads to NullPointerException this problem is similar with this link becuase when I do the debug of the picklistRender I got the same error showed in the link before,the same syntoms, but I am reading all issue history related, Thomas Andraschko sugguest is a problem of mojarra but I tried to test with myfaces-version-22 and myfaces-version-23 and I face the same problem Im trying to figure out to resolve my example works like

How to use c:forEach with p:dataTable and p:columnGroup?

断了今生、忘了曾经 提交于 2020-01-06 04:21:07
问题 I want to use a special form of grouping 'dynamic' columns. This is however not supported as stated in my other question. Using c:forEach was suggested as a possible solution Which is correct way to use c:forEach for defining table header and colums. My code BEFORE: <p:dataTable id="resultTable" var="result" value="#{myBean.searchResults}" scrollable="true"> <p:columns value="#{myBean.columns}" var="column" columnIndexVar="colIndex"> <f:facet name="header" > <h:outputText value="#{column

<p:schedule> doesn't display in the presence of jquery

丶灬走出姿态 提交于 2020-01-06 03:24:12
问题 I'm trying to display a primefaces schedule on a xhtml page but this doesn't work. As said in this question, i eliminated Components which uses Ajax and i noticed that when i commented the link referencing the jquery file the schedual is displayed and it works fine but of course other jquery stop to work and i also got the following JS error : TypeError: b3 is undefined @ http://localhost:8080/theprojectname/javax.faces.resource/jquery/jquery.js.xhtml?ln=primefaces:14 When i uncomment the

Primefaces Push - What are the methods in <p:socket/> client widget

别等时光非礼了梦想. 提交于 2020-01-06 03:22:04
问题 Can anybody point me to any api link which contains the <p:socket/> client widget? Going through the push showcase I can only see connect method in requestContext.execute("subscriber.connect('/" + username + "')"); What are the other methods.? Is there any disconnect method as-well.? Also, how to create separate channel for each user (in case of chat application). I reckon, this <p:socket onMessage="handleMessage" channel="/chat/#{userSession.userId}" autoConnect="false" widgetVar="subscriber

How to send an inputText to a bean at the moment a post request is made in JSF?

笑着哭i 提交于 2020-01-06 03:13:05
问题 The constraint I have is that my JSF + Primefaces page must include a post request in straight html: <form id="checkout" method="post" action="/checkout"> <div id="payment-form"></div> <input type="submit" value="Pay $10"> </form> And I can't touch that. On the same page, I have an inputText where the user will put their email address: <p:inputText value="#{bean.emailAddress}"/> When the button in the <form> is clicked for the post request, I'd like to have the inputText submitted as well and

How to Export only selected columns using columnToggler

谁都会走 提交于 2020-01-06 02:29:07
问题 Here I am using dataExporter for my table in primeFaces, It is successfully exported in type="xls" but the problem is that in addition I am using columnToggler for selection of columns and i want to target only those columns for export in xls file, those are checked/selected in columnToggler like: here is code of my dataExporter which targeted my table (id = "tbl"). <h:commandLink> <img src="Resources/images/excel.png"/> <p:dataExporter type="xls" target="tbl" fileName="dailyPoolReport_#

p:dataTable with converters/validators. Rows being editted on other than the first page do not stay in edit mode on conversion/validation violation

霸气de小男生 提交于 2020-01-05 12:50:37
问题 Consider any simple <p:dataTable> with any JSF validator(s) / converter(s). Given below a cut-down version as an example to reduce complexity. <p:column> <p:cellEditor> <f:facet name="output"> <h:outputText value="#{row.value}"/> </f:facet> <f:facet name="input"> <p:inputText value="#{row.value}" required="true"/> </f:facet> </p:cellEditor> </p:column> The given <p:inputText> is mandatory. Naturally, if a <p:row> is edited (using a <p:rowEditor> ) and the given validation is violated on