| Author |
managing Faces-config in jSF ...please explain.
|
hanumantha prem
Greenhorn
Joined: May 20, 2009
Posts: 13
|
|
I am working on jSF and i am using RAD 6,and I have one doubt.This is my faces config file.
<managed-bean>
<description>The one and only HelloBean.</description>
<managed-bean-name>helloBean</managed-bean-name>
<managed-bean-class>com.HelloBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<navigation-rule>
<description>Navigation from the hello page.</description>
<from-view-id>/hello.jsp</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/goodbye.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>pc_Myjsp</managed-bean-name>
<managed-bean-class>pagecode.Myjsp</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>pc_Hello</managed-bean-name>
<managed-bean-class>pagecode.Hello</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>pc_Goodbye</managed-bean-name>
<managed-bean-class>pagecode.Goodbye</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
The managed-bean helloBean is added by me for my application,and the other 2 which are generated by the application itself,i.e they are backing beans.How one can differentiate these files by looking at the faces config file..or is there any way to keep these in different files. or how do you manage in faces config. please reply
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14456
|
|
Backing beans are managed beans. A backing bean is a bean that's referenced in a JSF page definition.
A Managed bean is any JavaBean that's managed by the JSF framework. And the way you tell JSF to manage a bean is to define it in either faces-config.xml or a similar file(s) designated by you in your webapp's web.xml file according to JSF's rules for such definitions.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
hanumantha prem
Greenhorn
Joined: May 20, 2009
Posts: 13
|
|
|
But i want to keep the entries in different files..what could be done in order to do so.Please explain
|
 |
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Joined: Aug 26, 2006
Posts: 4967
|
|
You can have your JSF application read from separate faces-config files by entering their names in the deployment descriptor:
I've seen big appliations separate managed beans and navigation rules into separate files just to manage them a bit easier.
-Cameron McKenzie
|
Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
|
 |
 |
|
|
subject: managing Faces-config in jSF ...please explain.
|
|
|