Problem with Select All in DataTable

UI Components for JSF
neirkate
Posts: 2
Joined: 12 Sep 2010, 04:17

16 Nov 2010, 10:47

Hi all,

I found a problem using dataTable, especially the select all function. Whenever I click on the select all, the list return null, but when I click one by one, it works fine.

My code is as follows:

Code: Select all

<p:dataTable id="frmFilteredVendorDataTable" var="vendor" value="#{activeTenderEditBean.vendorList}" paginator="false" emptyMessage="No Data" rowIndexVar="index" selection="#{activeTenderEditBean.fileteredVendors}">
                                        			<p:column headerText="No">
														<h:outputText value="#{index+1}"></h:outputText>
													</p:column>
													<p:column selectionMode="multiple" />
													<p:column headerText="Name">
														<p:commandLink value="#{vendor.name}" actionListener="#{activeTenderEditBean.getVendorForVendorAnnouncement}" onsuccess="vendorDetailDlg.show()" update="frmVendorAnnouncement:showVendorDetailPanel">
															<f:attribute name="attribVendorId" value="#{vendor.vendor_id}"></f:attribute></p:commandLink></p:column>
                                        		</p:dataTable>
And in activeTenderEditBean I have:

Code: Select all

private VendorVO[] fileteredVendors;
public VendorVO[] getFileteredVendors() {
		return fileteredVendors;
	}

	public void setFileteredVendors(VendorVO[] fileteredVendors) {
		this.fileteredVendors = fileteredVendors;
	}
Does anyone found the same problem?

Regards,

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

16 Nov 2010, 10:54

Hi,

Have you compared with the live sample?

http://www.primefaces.org/showcase/ui/d ... eckbox.jsf

neirkate
Posts: 2
Joined: 12 Sep 2010, 04:17

16 Nov 2010, 12:58

Hi Prime,

Thanks for the reply. I've tested and the problem exist in paginator="false". If I set it to "true", it works just fine, is it a bug?

User avatar
chkal
Posts: 24
Joined: 06 Aug 2010, 15:53
Location: Germany
Contact:

24 Nov 2010, 13:33

Yes, this is a bug!

It has been reported before and there is an issue report including a patch.

I hope this gets fixed soon as I'm currently forced to maintain a Primefaces fork on GitHub for this and a few other issues like the Apache POI update.
Christian Kaltepoth
Blog: http://chkal.blogspot.com/
Twitter: http://twitter.com/chkal

callahan
Posts: 768
Joined: 27 May 2010, 22:52

25 Nov 2010, 03:30

Can you post a simple and concise example of what you mean please?

User avatar
chkal
Posts: 24
Joined: 06 Aug 2010, 15:53
Location: Germany
Contact:

25 Nov 2010, 09:54

You can reproduce this with the showcase. Edit the checkbox example in datatableRowSelectionRadioCheckbox.xhtml:

Replace

Code: Select all

paginator="true" rows="10"
with

Code: Select all

paginator="false"
Try to use the "select all" checkbox in the header! This will fail!

Just take a look at my patch. It should be very clear what is going wrong!
Christian Kaltepoth
Blog: http://chkal.blogspot.com/
Twitter: http://twitter.com/chkal

callahan
Posts: 768
Joined: 27 May 2010, 22:52

25 Nov 2010, 23:18

You're quite right, selectionMode="multiple" only works if the dataTable has a paginator.

@optimus: Is this not worth fixing?

User avatar
daniel_r
Posts: 199
Joined: 02 Mar 2009, 16:35

27 Nov 2010, 19:57

Having the same issue...

And i don't want to use the paginator as a workaround...

Hope it will be fixed...

Till then... how can i use the patch of chkal?
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit

User avatar
chkal
Posts: 24
Joined: 06 Aug 2010, 15:53
Location: Germany
Contact:

28 Nov 2010, 12:41

Just checkout the version you want to patch (2.2RC2 or 2.2-SNAPSHOT) and apply my patch attached to the issue report.

Or you could use my fork on GitHub: Just download the current version and build it yourself.
Christian Kaltepoth
Blog: http://chkal.blogspot.com/
Twitter: http://twitter.com/chkal

User avatar
daniel_r
Posts: 199
Joined: 02 Mar 2009, 16:35

29 Nov 2010, 21:49

I have installed maven 2 plug in for eclipse ( I have never worked with maven before....)

Downloaded the current version : chkal-primefaces-e528208 and extracted it....

afterward i did the following: import Maven 2 Project and selected the folder as a result it added a project to eclipse called chkal-primefaces-e528208

Finally , i tried to export a jar file - selecting various folders... but it was no good cause after i imported the created jar into my primefaces project it did not recognized the imports of org.primefaces... (one time it accepted the imports from the created jar - but throw me javax.el.ELException exception when i tried to browse the web app )

What am i doing wrong? ( i got a feeling all i did was wrong :) )

Regards


Daniel
Primefaces 3.4 , MyFaces 2.0.11
Tomcat 6
Win7 32bit

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 54 guests