Select data table single row using radio & single row select

UI Components for JSF
Post Reply
kunalpatil
Posts: 6
Joined: 18 Jul 2012, 20:13

29 Dec 2015, 12:24

Hi,

My code is something like this:

Code: Select all

<p:datatable selectionmode="single">
    <p:column selectionmode="single"/>
</p:datatable>
I want to be able to select a row either by clicking on the radio button or by clicking anywhere on the row. I have used AJAX event listeners in the following order:

Code: Select all

rowSelectRadio
and

Code: Select all

rowSelect
The above code enables me to select single row by clicking on the row. However, it does not allow selection via a radio button even though the radio buttons are enabled. Any solution?

Thanks,
Kunal

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

29 Jun 2020, 22:28

See my answer on Stack overflow.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

stolp
Posts: 127
Joined: 21 Aug 2018, 16:05

30 Jun 2020, 01:32

I think it would be a good idea to share the link to external sources as StackOverflow here so that people stumbling over this have a chance to follow the discussion easily.

This of course foremost includes the original poster.

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

30 Jun 2020, 13:25

You are right here is the stack overflow post: https://stackoverflow.com/questions/626 ... row-select
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests