dataGrid component issue

UI Components for JSF
Post Reply
ripper9100
Posts: 8
Joined: 08 Nov 2011, 01:15

29 Nov 2011, 19:59

Hi,

I'm using M3 and I am having an issue with the dataGrid component.
So, I'm using the following code and allProducts returns a list of 6 items. So the expected behavior should be 2 rows where the 1st row has 4 items and the 2nd has 2 items. But this not what is happening instead I'm seeing 1 row and 2 pages. The first page has 4 items while the second page has 3 items and in the second page the last item from the first page is repeating even though there are definitely no repeating elements in the list.

Code: Select all

<p:dataGrid var="product" value="#{store.allProducts}" columns="4" rows="3" paginator="true" paginatorPosition="bottom" effect="true">
      <p:column>
              <p:panel  style="text-align:center;width:220px; height:330px">
                      <h:panelGrid columns="1">
                              //stuff
                     </h:panelGrid>
            </p:panel>
     </p:column>
</p:dataGrid>
Anyone know why this might be happening?

victordas
Posts: 1
Joined: 29 Jul 2012, 19:28

29 Jul 2012, 19:41

I have similar issue with the following:

<p:dataGrid paginator="true"
columns="4"
rows="12"
paginatorTemplate="{PreviousPageLink} {NextPageLink}"
paginatorPosition="bottom"
var="c"
value="#{communityBean.names}"
>
<h:outputLabel value="#{c}"/>
</p:dataGrid>

there values are repeating.

Please reply.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 29 guests