aspose file tools*
The moose likes JSF and the fly likes Communication between multiple faces-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Communication between multiple faces-config.xml" Watch "Communication between multiple faces-config.xml" New topic
Author

Communication between multiple faces-config.xml

ved gunjan
Ranch Hand

Joined: May 17, 2003
Posts: 86
hi,
i'm new to jsf, and currently working on a project where we have multiple web projects..i.e multiple war and the scenarioa is how do we communicate between managed bean present in different faces-config files...i.e communication between multiple war's.

any suggestion will be appreciated.
thnx
ved
g madhava
Ranch Hand

Joined: Sep 14, 2001
Posts: 85
What App server are you using ? Which version of JSF are you using ?
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
I guess its not just about the JSF. It highly depends upon the application server you are using. I would recommend server docs.
ved gunjan
Ranch Hand

Joined: May 17, 2003
Posts: 86
thnx for the reply.
im using JBoss4.04.
wht my concern was if i could give an analogy to my problem is...if struts we have this struts-config file and we can have more that one such file....so to call action present in other config file we have SwitchAction.
Similarly if i have two faces-config file how we will reference the managed bean present present in second faces-config file from the first faces-config file.


hope im able to explain myself.
thnx.
g madhava
Ranch Hand

Joined: Sep 14, 2001
Posts: 85
Just reference them and it should work.
In your first faces-config.xml file.

<managed-bean>
<managed-bean-name>firstBean</managed-bean-name>
<managed-bean-class>
first.firstClass </managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-bean>


Your second faces config.xml file can reference the first as below.


<managed-bean>
<managed-bean-name>secondBean</managed-bean-name>
<managed-bean-class>
second.secondClass </managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>first</property-name>
<property-class>
first.FirstClass
</property-class>
<value>#{firstBean}</value>
</managed-property>
</managed-bean>


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Communication between multiple faces-config.xml