This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am new to JSF, so take it easy ok? After a lot of thinking, tips and checking out threads like this one approaching a similar situation, I have this scenario: I have a managed bean named PersonNav used to navigate in session scope. It stores a list of objects which I display with a dataTable. Each object of the list has a 'selected' property (boolean), which is rendered with selectBooleanCheckbox. My intention is to modify this property by selecting the checkbox and invoking an action in the same session-scoped PersonNav bean. The dataTable and commandLink look like this:
The action is executed, but the list is always empty. Looks like PersonNav is re-instantiated or something. Any ideas of how to tackle this down? Thanks
Henrique Sousa<br />SCJP 1.4<br /> <br />All men die, not all men really live - Braveheart, 1995
Joined: Apr 29, 2004
Update: PersonNav is the same instance in both calls (found out using Object.toString() implementation). Now I am really puzzled about the disappearance of 'list'. There is no setter for it (just getter), and the only place where it is instantiated is not executed. Any thoughts?
Update 2: Although it seems to be the same instance, the constructor of PersonNav is called before each action performed on it (and it has always the same object id). Could it be something related to serialization of the object when it is retrieved from the session? [ May 11, 2005: Message edited by: Henrique Sousa ]