Updating p:dataTable with LazyDataModel

UI Components for JSF
Post Reply
masti
Posts: 3
Joined: 21 Jun 2010, 17:49

21 Jun 2010, 18:04

Hi,
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>
I've noticed some strange behaviour, when my commandButton is in other h:form nothing happens,
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

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Seo-Ul-But and 27 guests