Primefaces 5.2 bug

UI Components for JSF
Grantsmith
Posts: 16
Joined: 01 Nov 2012, 06:48

08 Apr 2015, 00:45

This code works in 5.1, but not 5.2. In 5.2 the project object returned is always null.

Code: Select all

<p:dataTable id="data" var="project" value="#{projectList.projectDataModel}" scrollable="true" scrollHeight="555" resizableColumns="true"
                         selection="#{projectList.selectedProject}" selectionMode="single" filteredValue="#{projectList.filteredProjects}">

                <p:ajax event="rowSelect" listener="#{projectList.onRowSelect}"
                        update=":form:growl :nav"
                        oncomplete="editRowCommand()" immediate="true"/>

Code: Select all

public void onRowSelect(SelectEvent event) {

        Project project = (Project) event.getObject();
...

Primefaces 5.1 | Mojarra 2.2.10 | Omnifaces 1.8.1 | Weld 2.2.9.Final | Tomcat 8.0.18

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

08 Apr 2015, 09:51

I tested but I didn't see this bug. Please try Select Events example in showcase (Running PrimeFaces-5.2); http://www.primefaces.org/showcase/ui/d ... tion.xhtml

kurtomerfaruk
Posts: 47
Joined: 16 Jul 2013, 21:28
Location: Gaziantep / Turkey
Contact:

08 Apr 2015, 10:54

GrantSmith join you

PrimeFaces 5.1 running but 5.2 not running

when i click select datatable below throw error
getrowdata(string rowkey) must be implemented when basic rowkey algorithm is not used.
PrimeFaces 11.0.0 Community, PrimeFaces 12.0.0
Jakarta EE 9
Glassfish 6.2.5

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

08 Apr 2015, 11:17

Search the forum. Has been discussed several times the last couple of weeks

Grantsmith
Posts: 16
Joined: 01 Nov 2012, 06:48

08 Apr 2015, 18:02

kukeltje wrote:Search the forum. Has been discussed several times the last couple of weeks
Yet a search for +dataTable +select +5.2 does not show any such discussion ? Am I missing something here ? I can see that the Demo code works, but this doesn't help me understand what has changed which breaks MY code. I see one discussion about implementing rowKey, but that doesn't apply in my case.

I will continue experimenting until I find what underlying minuscule detail known only to the gods of Primefaces may be causing this. In the words of Dr Evil: "Throw me a freakin bone, people !"
Primefaces 5.1 | Mojarra 2.2.10 | Omnifaces 1.8.1 | Weld 2.2.9.Final | Tomcat 8.0.18

Grantsmith
Posts: 16
Joined: 01 Nov 2012, 06:48

08 Apr 2015, 19:23

After wasting a couple of hours, I have found the problem, which I still consider a Primefaces 5.2 bug.

Even though my DataModel implements getRowKey and getRowData, you STILL have to specify rowKey="#{project.id}" in the p:dataTable. This was NOT required in 5.1.

I can understand why this has changed. With using rowKey directly in the tag, you now don't HAVE to implement a SelectableDataModel in the backing bean, because you can specify the rowKey; so you can simply use a List. That is all very cool, but when the user HAS a SelectableDataModel implemented, Primefaces should recognize that and allow the old behavior.
Primefaces 5.1 | Mojarra 2.2.10 | Omnifaces 1.8.1 | Weld 2.2.9.Final | Tomcat 8.0.18

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

08 Apr 2015, 20:01

Please create a issue + attach a minimal bean and xhtml example. Would be great if you could build it based on showcase beans/xhtml ;)
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

fpoulet
Posts: 25
Joined: 22 May 2013, 10:02

14 Apr 2015, 11:01

I confirm that we have exactly the same issue.
Actually it prevent us to move to 5.2
Waiting the first elite with a fix.

Regards,
PrimeFaces 12.0.2 | PrimeFaces-Extension 12.0.3
Tomcat 9.0
Mojarra 2.3.18 | OpenJdk 17
Cayenne 4.1 |Oracle/SQLServer
Windows 11 | Mozilla FF,Chrome&IE

AHesse
Posts: 3
Joined: 14 Jan 2014, 13:46

24 Apr 2015, 12:16

Datable selection is broken in our app when using PF 5.2. This is a showstoppper for us too. Specifying the rowkey does help, but we got performance issue with huge multiple selections. Does an issue already exist?
PF 5.1.13, Mojarra 2.2.6, Tomcat 7.0.40, JDK 1.7.0 U 71

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

25 Apr 2015, 11:00

I have no perfornance issues with multiple selection. Please create a new topic, post code and profiling info

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 33 guests