• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page Scope useBean

 
Aruneesh Salhotra
Ranch Hand
Posts: 167
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone describe what the pageScope in useBean essentially mean.
I know that if gives the method findinscope(attribute) method which might come in handy.

Apart from that is there any useful purpose for the pageScope.
 
Sergey Tyulkin
Ranch Hand
Posts: 87
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Imagine you have 2 JSPs. And first includes the second. Then, if they both define a variable with the same name, and put it in request scope, then the first page will receive value from the second page (and this behaviour may be wrong). But if the use page scope, then they will have different variables.
You can think about page scope variable as private variables in ordinal class. Only this page will have an access to them
 
Aruneesh Salhotra
Ranch Hand
Posts: 167
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx for the explaination on this. This absolutely is required.
A rare situation to happen, but practically it should be handled through pageScope.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic