• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Request Scoped Managed bean Confusion?

 
Ranch Hand
Posts: 103
jQuery Netbeans IDE Notepad
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I am new to jsf application development and
I am really confused at some thing which I figured out.

the situation is , I am having a managed bean which is in request scope.
The jsp which is using that bean has a command button rendered attribute set to false by default.
On some value change event I change that attribute value to true.
But even now when the button is visible, the action method bounded to the bean does not execute and my whole bean gets refreshed. (Constructor gets called( expected)).

In other case if I make the render attribute of the button to true by default , then the button works fine , no problem at all.

Please clarify me on this behaviour of jsf.

Thanks & Regards
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Request scope is almost totally useless in JSF because JSF re-requests the same page (postback) and each request creates a new copy of the request-scope beans.

If you are using JSF2, consider View Scope. For JSF 1, you need Session Scope.
 
reply
    Bookmark Topic Watch Topic
  • New Topic