The selection works fine in any page in any row for the first time, but when I change to another page, the selection sticks in the last Car selected (in the previous page), and also the pagination breaks and it doesn't refresh the rows any more, It stays showing the same rows ignoring the page change requested.
I have added the following annotations,
Code: Select all
...
@ManagedBean(name = "tableBean")
@ViewScoped
public class TableBean {
...
Code: Select all
...
<p:dataTable var="car" value="#{tableBean.mediumCarsModel}" paginator="true" rows="10"
selection="#{tableBean.selectedCar}" selectionMode="single">
<p:ajax event="rowSelect" update=":form:display :form:growl" oncomplete="carDialog.show()" />
...
The Server is giving me this output when I load the page.
Dec 13, 2011 1:13:10 PM javax.faces.component.UIViewRoot$ViewMap put
WARNING: Setting non-serializable attribute value into ViewMap: (key: tableBean, value class: org.primefaces.examples.view.TableBean)
The same error happens with basic row selection. I have tested it in Chrome an IE9.
Thanks a lot for any clue!