JSF access to beans


Web tier: servlets, JSP, Web frameworks: JSF access to beans

  1. JSF access to beans (1 messages)

    I'm considering JSF framework for my presentation layer and I have a serious doubt.
    Remember how in struts we create our form with a property typed for example Person:

    public class PersonForm extends ActionForm {
       private Person thePerson;

       //getter and setter....

    And then in the JSP we write this kind of references:

    <bean:write name="myForm" property= "thePerson.name" />

    How do we do this in JSF?

    We wrote something similar in our backin bean but we didn't get any result.
    Our team has been banging their head against the wall for a couple of days with no advance or any clue to continue.

    Thank you all for your help.

    Threaded Messages (1)

  2. JSF EL[ Go to top ]

    You can use the JSF Expression Language Markup for this:


    What you're doing here is mapping the value of the component to the corresponding value in the backing bean. This example above will look for a managed-bean named "thePerson" and will call the getName() method of that bean and make it the value for this component.