I'm newbie in PrimeFaces, and I'm very impressed with your work, my sincere congratulations.
I'm having problems with some examples. In particular, I don't get to run the Sample DataTable - Basic Row Selection.
The problem is that when I select a row, it triggers the event and updates the property, it's ok, but then the property does not show the new value.
It is my code:
Code: Select all
<?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:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.prime.com.tr/ui"
>
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<h:form>
<p:dataTable var="row" value="#{hoteles.listado}"
paginator="true" paginatorPosition="bottom" rows="10"
selection="#{hoteles.selectedHotel}" selectionMode="single"
rowSelectListener="#{hoteles.onRowSelect}"
onRowSelectComplete="hotelDialog.show()"
>
<p:column>
<f:facet name="header">
<h:outputText value="Hotel" />
</f:facet>
<h:outputText value="#{row.hotel}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Email" />
</f:facet>
<h:outputText value="#{row.email}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="Codigo" />
</f:facet>
<h:outputText value="#{row.cod_hotel}" />
</p:column>
</p:dataTable>
<p:dialog header="Detalle hotel" widgetVar="hotelDialog" resizable="false"
width="200" showEffect="explode" hideEffect="explode">
<h:panelGrid id="display" columns="2" cellpadding="4">
<h:outputText value="Hotel:" />
<h:outputText value="#{hoteles.selectedHotel.hotel}" />
</h:panelGrid>
</p:dialog>
</h:form>
</h:body>
</html>
Code: Select all
<p:dataTable var="row" value="#{hoteles.listado}"
paginator="true" paginatorPosition="bottom" rows="10"
selection="#{hoteles.selectedHotel}" selectionMode="single"
rowSelectListener="#{hoteles.onRowSelect}"
onRowSelectComplete="hotelDialog.show()" update="display"
>
This property is not used in the examples, particularly in "dataTableRowSelection.xhtml." http://www.primefaces.org/showcase/ui/d ... Column.jsf
But if I do not use it not make them work. What could be happening?
Thanks in advance.