PF5 p:column disabledSelection not work

UI Components for JSF
omarbr
Posts: 79
Joined: 04 Dec 2012, 17:08

21 May 2014, 16:41

on pf5 this code not work

Code: Select all

<p:column selectionMode="multiple" style="width:20px" disabledSelection="#{pdv.status == 'VALID'}"/>
on pf4 work.
PrimeFaces 5.3 | Payara | Mojarra 2.2.10
Firefox 38+

omarbr
Posts: 79
Joined: 04 Dec 2012, 17:08

22 May 2014, 11:46

PrimeFaces 5.3 | Payara | Mojarra 2.2.10
Firefox 38+

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

22 May 2014, 15:32

You need to use disabledSelection attribute of datatable instead.

omarbr
Posts: 79
Joined: 04 Dec 2012, 17:08

22 May 2014, 15:39

optimus.prime wrote:You need to use disabledSelection attribute of datatable instead.
ok, but disabledSelection of datatable, disable global.
i need disable condition for row

on pf4 work, on pf5 removed this function?
PrimeFaces 5.3 | Payara | Mojarra 2.2.10
Firefox 38+

subbukalidindi
Posts: 2
Joined: 27 May 2014, 18:16

27 May 2014, 18:50

I am also having same issue with PF4

omarbr
Posts: 79
Joined: 04 Dec 2012, 17:08

28 May 2014, 14:27

subbukalidindi wrote:I am also having same issue with PF4
i'm using with pf 4.0.0 and work very well.

optimus, alternative solution for disable selection on row?
on my application is not possible disable globaly, but i need disable row by row.
PrimeFaces 5.3 | Payara | Mojarra 2.2.10
Firefox 38+

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

28 May 2014, 16:40

Search the forum. A 'solution' with some jquery script to remove classes from specific rows has been discussed before

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

28 May 2014, 17:57

Example would be;

Code: Select all

<p:dataTable var="xxx" disabledSelection="#{xxx.year > 1960}" ...>

omarbr
Posts: 79
Joined: 04 Dec 2012, 17:08

28 May 2014, 18:12

optimus.prime wrote:Example would be;

Code: Select all

<p:dataTable var="xxx" disabledSelection="#{xxx.year > 1960}" ...>
Obviously it works
Many thanks Optimus
PrimeFaces 5.3 | Payara | Mojarra 2.2.10
Firefox 38+

jgraf
Posts: 4
Joined: 06 Aug 2015, 16:12

19 Jul 2016, 23:38

optimus.prime wrote:Example would be;

Code: Select all

<p:dataTable var="xxx" disabledSelection="#{xxx.year > 1960}" ...>

This is the best answer and works perfectly for me.

This example should be placed in the User Guide - 3.33 DataTable section. There is the note in p:column that not all of that component's attributes works in components that use p:column, but that is a bit opaque (nothing in datatable documentation suggests that using p:column's disabledSelection won't work except for trying it and seeing it doesn't do anything) and leads to the inevitable post of "search the forum" which inevitably comes up in a search of the forum. :lol:

Maybe something like

Code: Select all

disabledSelection | false | Boolean | Disables row selection when true. eg: var="xxx" disabledSelection="#{xxx.year > 1960}"
This example shows that the attribute is not (necessarily) a global disable for selections.

thanks for posting the answer!

-jim
PrimeFaces 5.3 - Mojarra 2.2.12 - Tomcat 8.0.30

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 62 guests