I'm trying to update data in p:dataTable but with no success
here is my code:
Code: Select all
<p:dataTable var="user" value="#{uzytkownik.listaUzytkownikow}" id="userList"
loadingMessage="Trwa pobieranie danych" paginatorPosition="bottom"
paginator="true" rows="2" dynamic="true" lazy="true" selectionMode="single"
selection="#{uzytkownik.selectedUser}" update="details"
paginatorTemplate="{FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}">
<p:column width="120">
<f:facet name="header">
<h:outputText value="Login" />
</f:facet>
<h:outputText value="#{user.login}" />
</p:column>
<p:column width="120">
<f:facet name="header">
<h:outputText value="Status" />
</f:facet>
<h:outputText value="#{user.enabled}" />
</p:column>
</p:dataTable>
</h:panelGroup>
<p:commandButton value="Ajax Submit" ajax="true" immediate="true"
actionListener="#{uzytkownik.toogleUser}" update="details,userList"
style="margin-right:20px;" />
</h:form>
but when it is in the same form as p:dataTable i makes sql query to database but the table vanishes
Please help.
//Edit
I found my problem, I was using mojarra 2.0.0. instead of 2.0.2