primefaces

Primefaces DataTable+LazyDataModel won't pass setPropertyActionListener in request scope

百般思念 提交于 2019-12-24 18:58:06
问题 I have a Primefaces DataTable based on LazyDataModel. I successfully managed to load data in the table but I am not being able to use setPropertyActionListener to show the selected items in a Dialog nor to edit rows. I am using request scope and I noticed this issue seems to be solved in session scope, but I would rather use the former (View scope won't even load data in the table). I already tried to override getRowData and getRowKey methods but they don't even get called. I have none of

p:dataTable with p:columns with custom widths

﹥>﹥吖頭↗ 提交于 2019-12-24 18:19:51
问题 I have a Datatable with dynamic columns via the p:columns tag and want to specify a different width for each column. My code is as below <p:dataTable id="scheduleDataTable" value="#{scheduleMB.scheduledRecords}" var="sched" rows="10"> <p:columns value="#{scheduleMB.columns}" var="column" columnIndexVar="colIndex" styleClass="day-column"> <f:facet name="header"> #{column.header} </f:facet> #{sched[column.property]} </p:columns> </p:dataTable> in the css file I have the width .ui-state-default

binding of <p:gmap component doesn't work - Primefaces 3.4.1

冷暖自知 提交于 2019-12-24 18:12:21
问题 I'm using the p:gmap component in an application, but when I try to use the binding attribute to reference a GMap in a bean, it doesn't work and the map is not showed. JSF code: <p:gmap binding="#{mapBean.map}" center=" -26.9995, -49.686" zoom="11" type="ROADMAP" /> Backing bean code: public GMap getMap() { map = new GMap(); map.setCenter("-26.9995, -49.686"); map.setZoom(11); map.setType("ROADMAP"); map.setModel(geoModel); map.setStyle("width:850px;height:450px"); map.setWidgetVar("vMap");

Primefaces p:remoteCommand parameter always null [duplicate]

不羁的心 提交于 2019-12-24 17:56:00
问题 This question already has answers here : Pass parameter to p:remoteCommand from JavaScript (7 answers) Closed 3 years ago . I am trying to pass a parameters with p:remoteCommand Unfortunately when I retrieve the paramer in my bean method I always get null. Is there anything wrong with my code? Here is my page code: <a href="#" onclick="rc([{'d':'01'}])">01</a> <p:remoteCommand name="rc" update=":myform:messages" actionListener="#{mybean.changedaybar}" /> and this is the bean method: public

preRenderView not firing with ui:include

非 Y 不嫁゛ 提交于 2019-12-24 17:20:29
问题 I have a typical JSF templated menu structure and page. Below is the code of my main page <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" xmlns:c="http://java.sun.com/jsp/jstl/core"> <ui:composition template="/templates/internal3section.xhtml"> <ui:define name="events"> <f:event listener="#{mainBean.entryGate}" type="preRenderView" /> </ui

JSF update primefaces tree children

北慕城南 提交于 2019-12-24 17:12:10
问题 i want to update the children of the primefaces tree without pulling the whole tree from the server. I can update the whole tree but not only the children of a specific node ... Edit: This is an example of my code: <p:tree value="#{cc.tree}" var="wrapper" id="tree" widgetVar="tree" styleClass="commentTree-#{cc.id}"> <p:treeNode id="treeNode" styleClass="treenode-#{wrapper.id}"> Hallo: #{wrapper.text} </p:treeNode> </p:tree> Now i want to update a specific treenode. function findIDbySelector

How to programmatically trigger onclick event

大兔子大兔子 提交于 2019-12-24 17:04:41
问题 How can I programmatically trigger onclick/oncompleted event? E.g. <p:commandButton value="Destroy the World" onclick="confirmation.show()" type="button"/> <p:confirmDialog message="Are you sure about destroying the world?" showEffect="bounce" hideEffect="explode" header="Initiating destroy process" severity="alert" widgetVar="confirmation"> </p:confirmDialog> I'm trying to trigger onclick="confirmation.show()" from a backing bean. I'm using JSF2/Primefaces 2.2. 回答1: You should use the

pe:documentViewer no work with primefaces 5.1

ぃ、小莉子 提交于 2019-12-24 16:52:53
问题 pe:documentViewer doesn't work with primefaces 5.1. This code works good with PF 5.0, but in PF 5.1 shows this error: javax.servlet.ServletException: org.primefaces.util.DynamicResourceBuilder.build(Ljavax/faces/context/FacesContext;Ljava/lang/Object;Ljavax/faces/component/UIComponent;Z)Ljava/lang/String; Causa Raíz java.lang.NoSuchMethodError: org.primefaces.util.DynamicResourceBuilder.build(Ljavax/faces/context/FacesContext;Ljava/lang/Object;Ljavax/faces/component/UIComponent;Z)Ljava/lang

p:selectBooleanButton doesn't render preselected value

天大地大妈咪最大 提交于 2019-12-24 16:38:57
问题 I been reading / trying examples for hours, and I can't make it work. I'm using Primefaces 4.0 I just need a way to select/unselect and assign those values to a Map The xhtml looks like this. <p:selectBooleanButton value="#{presupuestoBean.itemsCambiar[itemPresupuesto.id]}" onLabel="Yes" offLabel="No" onIcon="ui-icon-check" offIcon="ui-icon-close"> <p:ajax listener="#{presupuestoBean.updateItemPresupuestoAsignado(itemPresupuesto.id,0)}"/> </p:selectBooleanButton> Init Method (reset to False

Primefaces datatable colspan column width - Not Working

拟墨画扇 提交于 2019-12-24 16:37:51
问题 i try to create a primefaces datatable with fixed column width for some(not all) columns. The tableheader got 3 rows with colspan and rowspan. I want now to fix the width of the first column under "a". The second column should be dynamic. Without Colspan i could use the width attribute of the Header Column element. But now i cant use the header column because it is for two columns. The width for the normal Column is ignored. (width="30" and style="width:30px;") I added a screenshot of my