Results 1 to 3 of 3
  1. #1
    Denton is offline Member
    Join Date
    Feb 2011
    Posts
    1
    Rep Power
    0

    Question JSF: Managed-Bean with Request Scope

    Hi everyone,

    I'm getting starting with JSF and I need your help for a doubt. :o

    Reading the documentation, I understand that a managed bean with scope request is created when a page is called from the browser, and it is killed when the response is returned to brower.

    Now, I've done this test:

    - Page A, with a button "next" and an input text field. There is also a navigation rule from Page A to Page B on click.

    - Page B, with a button "back" and an output text field. There is also a navigation rule from page A to page B on click.

    - I created a Bean with request scope and an attribute of type String. This attribute is linked on text fields in pages.


    then, this happens:


    - Start Page A, I type a text on input field and click on button.
    - When page B is rendered, the input field in page B shows the same text that I digited on page A.
    - When click on button in page B, page A is loaded and the text is the same.

    Why?

    If the scope is request, I hope that the Constructor of Bean runs everytime!!

    Anyone can explain me why??


    Thanks at all in advance...
    Last edited by Denton; 02-28-2011 at 06:24 PM.

  2. #2
    pmv103 is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Default

    Please check your jsf related jar and their versions
    Thanks

  3. #3
    pmv103 is offline Member
    Join Date
    Mar 2011
    Posts
    3
    Rep Power
    0

    Smile Jsf

    Please check your jsf related jar and their versions
    Thanks
    Last edited by pmv103; 03-11-2011 at 08:43 AM.

Similar Threads

  1. Bean not found in scope
    By Drun in forum Web Frameworks
    Replies: 0
    Last Post: 01-28-2010, 03:29 PM
  2. Problem with Session Scope while using with Java Bean
    By sulthanmytheen in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 03-27-2009, 10:50 AM
  3. How to define Bean Scope
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-30-2008, 10:14 AM
  4. Container Managed Persistence
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-27-2007, 10:16 AM
  5. How to define Bean Scope
    By JavaBean in forum Java Tip
    Replies: 0
    Last Post: 09-26-2007, 08:43 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •