scope « Bean « JSF Q&A





1. JSF initialize application-scope bean when context initialized    stackoverflow.com

I'm building a JSF+Facelets web app, one piece of which is a method that scans a directory every so often and indexes any changes. This method is part of a ...

2. what is none scope bean and when to use it?    stackoverflow.com

could some explain what a none scope is and purpose of it? Suppose if i have a bean in

request scope as r1

session scope as s1

application scope a1
and say i inject none ...

3. Why having multiple managed beans?    stackoverflow.com

This is more of a general question, so that I a better understand about JSF and managed bean. So when people having multiple managed bean, is it solely because they want ...

4. Custom Scoped Bean JSF 2.0    stackoverflow.com

Hi I have a bean and I want to define it as a CustomScoped Bean based on time, I mean I want to destroy the bean after a specific period of idle ...

5. Invoking application scoped bean jsf    stackoverflow.com

In my applicatoin I have a application scoped bean, which I call it like this: FacesContext.getCurrentInstance().getExternalContext().getApplicationMap().get("name"); What is the best way to initialize it? The way I do till now it to call one ...

6. JSF2 (Mojarra) View Scope Managed Bean wants all members to be Serializable    stackoverflow.com

I am trying to convert a session scoped JSF managed bean to view scoped. However, when I try to access the xhtml page for this bean, then i get the following ...

7. JSF 2.0 Accessing Application Scope bean from another Bean    stackoverflow.com

I am using jsf 2.0 and I have two bean Navigation (Application Scope ) and Module (Request Scope). I want to use methods of Navigation bean in Module Bean. I am ...

8. Backing Beans - which of them should be scoped?    stackoverflow.com

I have two kinds of backing beans in my JSF application:

  • Managed Beans (@ManagedBean(name="bean"))
  • Entity Beans (@Entity)
Which of them should be scoped (request/session/view/application/no)? I'm having all of my managed beans scoped and entity beans ...

9. View scoped managed bean with setPropertyActionListener    stackoverflow.com

I cant seem to get the view scoped managed bean to work with setPropertyActionListener:

   <h:commandButton value="Edit"  action="edit-company.xhtml">
    <f:setPropertyActionListener target="#{companyHolder.item}" value="#{company}"/>      ...





10. Help me to understand JSF managed bean scope from concurrency view    stackoverflow.com

Can anyone help me to understand the JSF managed bean scope from a concurrency perspective ? My Understanding: Once i have a bean scoped in a session scope that's mean : there is ...

11. How to choose the right bean scope?    stackoverflow.com

I noticed that there are different bean scopes like:

@RequestScoped
@ViewScoped
@SessionScoped
@ApplicationScoped
What is the purpose of each? How do I choose a proper scope for my bean?

12. Using Bean (View Scope) in JSF to show data    stackoverflow.com

I'm creating an web application, using JSF (2.0). It has "ViewProducts.xhtml" to view Product with page. Each time this page loaded, if parameter has some thing (Eg: page=1 (ViewProduct.xhtml?page=1)), it's will automatically ...

13. What managed bean scope should I use?    stackoverflow.com

I have 3 different page where I use list of Users. First page contains dataTable with users from one session scope managed bean. On that page I can change selected user details. Second ...

14. Bean scope in model Panel    stackoverflow.com

I Have created an web application using JSF (1.2). I have Used 'session' scope in faces-config.xml. Now i am Moving the application from JSF (1.2) to JSF (2.0) . ...

15. Bean's scope    coderanch.com

16. Application Scoped Managed Bean    coderanch.com





17. managed-bean-scope = wizard scope    coderanch.com

18. Default scope of managed-bean-scope?    coderanch.com

19. managed bean scope    coderanch.com

Hi, When I keep scope of my managed bean as session, everything works fine but the moment I change it to request, error page is displayed. There is no error / exception in the server log. When I checked boot.log file , somewhere I found the first 2 lines & then it forwards control to error.jsp - 20:23:13,934 DEBUG [JspStateManagerImpl] Exiting ...

20. Backing Bean Scope (Best Practices?)    coderanch.com

21. Caching in application scope JSF managed bean    coderanch.com

Thanks. In fact, I'm wondering if it's a best practice to load a catalog of products in an application scope JSF managed bean from startup, or to use caching after the first call of a product. And is it possible to update cache using setter methods in the managed bean. Thanks in advance. Amine.

24. Using view-scoped beans during the restore view phase    coderanch.com

I have come across an issue regarding the use of view-scoped beans on components where the value expression is evaluated as part of the buildView() process. Essentially, it seems that the view scope is only restored AFTER the component tree has been built which means it is not possible to do the following: or When the component ...

25. Synchronising access to application scoped managed beans    coderanch.com

I think you've got apples mixed in with the oranges here. It's generally not recommended to use Domain Model objects (including EJBs) as backing beans or managed beans. If you're interested in some of the reasons, do a quick search of this forum - the issue has been discussed 2 or 3 times this year already. In the original EJB architecture, ...

26. Hooking Beans Based on Scope    coderanch.com

27. Backing bean scope problem    coderanch.com

I have a managed bean and it's scope is defined as managed (in faces-config.xml). When i go to the page for which this bean is the backing bean, the constructor is called. But when i go through the app and come back to the page, the construtor is not called again. Why? Isn't this behaviour of session scoped bean?