Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How this bean is remembering the state?  RSS feed

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I have been re-reading "JSF In Action" and there is something I didn't
understand.
ShowHistoryBean is a request based bean and its role is displaying
the project's history using paging technique.
Project's history is displayed using UIData component.

Suppose the page is requested for the first time, a new instance of
ShowHistoryBean is created and first variable's value is 0.
The user clicks on next button, the books says that first variable's
value will be 5 (the example is paging each 5 records).
But isn't supposed to create a new ShowHistoryBean each time the user
clicks on next button as ShowHistoryBean's scope is request?
In the book's example, how historyDataTable is remembering first variable's value?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!