2 Replies Latest reply on Apr 7, 2010 8:08 AM by sward

    Test JSF Backing Bean

    sward

      Dear

      I want to know how to test my JSF  backing bean using JSFUnit

      I knew how to get a value from backing bean using getManagedBeanValue but i want to call a method on the backi9ng bean but i don't know how to do

      can you help??

        • 1. Re: Test JSF Backing Bean
          ssilvert

          You can use getManagedBeanValue() to evaluate any ValueExpression.  For example, say I have a class Person bound in session scope to the name "employee".  I could say:

           

          Person employee = (Person)jsfServerSession.getManagedBeanValue("#{employee}");

          employee.calculateSomething();

           

           

          Stan

          1 of 1 people found this helpful
          • 2. Re: Test JSF Backing Bean
            sward

            Thank you Stan for your fast response