CodesJava

Easy learning with example program codes

JSF managed property annotation


JSF managed bean:

A managed bean is a normal java bean class which contains data and business logic. A managed bean is managed by JSF framework and act as a model for JSF application. Before using a managed bean we have to configure it either in faces-config.xml file or using annotation.

@ManagedProperty:

The @ManagedProperty annotation is used for injecting a bean into a property of another bean. The @ManagedProperty annotation uses setter method of the bean which is used as a property into another bean. So we must have to provide setter method of that property. Value attribute contains the name of the bean to be injected.

 

Sign Up/ Sign In
Ask a Question


Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki