adsense


Monday, 30 November 2015

SCOPE ANNOTATIONS

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button



JAVA SERVER FACES






Scope Annotations 


Scope annotations set the scope into which the managed bean will 
be placed. If scope is not specified then bean will default to 
request scope. Each scope is briefly discussed below 




Scope 	                  Description 

@RequestScoped 	         Bean lives as long as the HTTP request-response 
                         lives. It get created upon a HTTP request and get 
                         destroyed when the HTTP response associated with 
                         the HTTP request is finished. 

@NoneScoped 	         Bean lives as long as a single EL evaluation. It get 
                         created upon an EL evaluation and get destroyed 
                         immediately after the EL evaluation. 

@ViewScoped 	         Bean lives as long as user is interacting with the 
                         same JSF view in the browser window/tab. It get created 
                         upon a HTTP request and get destroyed once user 
                         postback to a different view. 

@SessionScoped 	         Bean lives as long as the HTTP session lives. 
                         It get created upon the first HTTP request involving 
                         this bean in the session and get destroyed when 
                         the HTTP session is invalidated. 

@ApplicationScoped 	Bean lives as long as the web application lives. 
                        It get created upon the first HTTP request involving 
                        this bean in the application (or when the web application 
                        starts up and the eager=true attribute is set in @ManagedBean) 
                        and get destroyed when the web application shuts down. 



No comments: