Datatable: Row remains selected after clearing backing bean
See original GitHub issueDescribe the defect Basic datatable with single selection: when a row is selected and an action that clears the backing bean selected row object is executed, the row remains selected in the browser.
This only happens when the datatable has declared the “rowSelect” event.
Reproducer Run the attached project (mvn jetty:run) and visit http://localhost:8080/primefaces-test/. Then select a row and click “Unselect row” button. The row remains selected in the browser.
It works fine (the row is no longer selected) if you comment out the following line in test.xhtml:
<p:ajax event="rowSelect" listener="#{testView.onSelectProduct}" />
Environment:
- PF Version: 10.0.x
- JSF + version: Mojarra 2.2.20 and MyFaces 2.3.9
- Affected browsers: ALL
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (10 by maintainers)
Top Results From Across the Web
Set selected row from backing bean in primefaces datatable
I am using primefaces datatable with clickable rows and I need to find way how to set selected row from backing bean. ......
Read more >[solved] deleting DataTable row via button in the same row
Hi all! I am trying to create simple CRUD table with button "edit" and "delete" at every data row. Completely stuck with the...
Read more >Refresh a table of data after inserting or deleting a row using ...
Select a row from a table of data, click a button to delete the row, and remain on the same page. The table...
Read more >row().remove() - DataTables
row ().remove(). Since: DataTables 1.10. Delete the selected row from the DataTable. Description. This method (and its plural counterpart, ...
Read more >About request scope and removing a row from datatable
If the client clicks on a commandButton or commandLink on a row in the dataTable, the form request is then sent back to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Working properly with version 10.0.6. Thanks!
Figured it out. Thanks for the reproducer helping me debug it!