Sample of faces-config.xml file??
<?xml version='1.0' encoding='UTF-8'?>
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
<resource-bundle>
<base-name>testlab.properties.labtest</base-name>
<var>address</var>
</resource-bundle>
<message-bundle>testlab.ui.MyMessages</message-bundle>
</application>
<managed-bean>
<managed-bean-name>utilsDb</managed-bean-name>
<managed-bean-class>testlab.utils.TestlabUtilsDb</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>jdbcTemplate</property-name>
<value>#{jdbcTemplate}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>testlab.beans.UserBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>loginBo</property-name>
<value>#{loginBo}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>tdbean</managed-bean-name>
<managed-bean-class>testlab.beans.TestDetailBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>testDetailBo</property-name>
<value>#{testDetailBo}</value>
</managed-property>
</managed-bean>
<lifecycle>
<phase-listener>testlab.utils.SessionPhaseListener</phase-listener>
</lifecycle>
<managed-bean>
<managed-bean-name>adminBean</managed-bean-name>
<managed-bean-class>testlab.beans.AdminBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>adminBo</property-name>
<value>#{adminBo}</value>
</managed-property>
</managed-bean>
</faces-config>
<?xml version='1.0' encoding='UTF-8'?>
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
<resource-bundle>
<base-name>testlab.properties.labtest</base-name>
<var>address</var>
</resource-bundle>
<message-bundle>testlab.ui.MyMessages</message-bundle>
</application>
<managed-bean>
<managed-bean-name>utilsDb</managed-bean-name>
<managed-bean-class>testlab.utils.TestlabUtilsDb</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>jdbcTemplate</property-name>
<value>#{jdbcTemplate}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>user</managed-bean-name>
<managed-bean-class>testlab.beans.UserBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>loginBo</property-name>
<value>#{loginBo}</value>
</managed-property>
</managed-bean>
<managed-bean>
<managed-bean-name>tdbean</managed-bean-name>
<managed-bean-class>testlab.beans.TestDetailBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>testDetailBo</property-name>
<value>#{testDetailBo}</value>
</managed-property>
</managed-bean>
<lifecycle>
<phase-listener>testlab.utils.SessionPhaseListener</phase-listener>
</lifecycle>
<managed-bean>
<managed-bean-name>adminBean</managed-bean-name>
<managed-bean-class>testlab.beans.AdminBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>adminBo</property-name>
<value>#{adminBo}</value>
</managed-property>
</managed-bean>
</faces-config>
No comments:
Post a Comment