• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

managing Faces-config in jSF ...please explain.

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 25625
183
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
hanumantha prem
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But i want to keep the entries in different files..what could be done in order to do so.Please explain
 
author and cow tipper
Posts: 5006
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic