Contents merging for multiple faces-config.xml

Hi, I know from another post that it's possible to use multiple faces-config.xml. Ok. But which rules do apply for merging contents ? If I have a multiple components application, then I expect to have a single faces-config per component, containing its managed beans, while I would keep navigation rules and general issues (such as facelets config) into a common faces-config.
Would it work that way ?

See Re: Very slow performance in Jdeveloper

Similar Messages

  • [Faces] Criterias for multiple faces-config.xml files...

    Hi, I'm working in a big development proyect migrating an ERP. We know the mechanics of having multiple "faces-config" files, but is there some recommendation about the number of pages supported, or the total file size, or any other? We have found that jDeveloper has serious performance problems (in the development environment) with a big number of pages and navigation rules in one config file, but will it be the same if there are a lot of config files?
    Has someone come to the same questions? Can someone share his or her experience on this particular matter?
    Thanks for your

    See Re: Very slow performance in Jdeveloper

  • Working with multiple faces-config.xml files

    I would organize the menu definitions of my application in different faces-config.xml files. I would also put the label in different properties files.
    The SRDemo application uses a unique properties file for the menu used in the el expression from the faces-config.xml.
    Is it possible to have the same approach with not only one faces-config.xml file but has many faces-config.xml i want for my application.
    If yes does the binding name to be different or may be the same for each file ?

    We still have a litlle problem we don't find the reason. May be you can help us.
    The second menu level never appear in the menu list. The menu list appear as empty.
    The menu bar seem to be correct. We put twice the same model tree to be sure it was working well. Both menu appears. It is correct.
    Here is our faces-config-menu-flexsystem.xml file
    <?xml version="1.0" encoding="windows-1252"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config xmlns="http://java.sun.com/JSF/Configuration">
    <managed-bean>
    <description>Create menu item for flex system management</description>
    <managed-bean-name>menu_menuitem_FlexSystem_Create</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuItem</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>label</property-name>
    <value>#{resources['menu.FlexSystem.menuItem.create']}</value>
    </managed-property>
    <managed-property>
    <property-name>viewId</property-name>
    <null-value/>
    </managed-property>
    <managed-property>
    <property-name>outcome</property-name>
    <value>linkToCreateNewFlexSystem</value>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <description>Manage menu item for flex system management</description>
    <managed-bean-name>menu_menuitem_FlexSystem_Manage</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuItem</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>label</property-name>
    <value>#{resources['menu.FlexSystem.menuItem.manage']}</value>
    </managed-property>
    <managed-property>
    <property-name>viewId</property-name>
    <value>\FlexHome.jspx</value>
    </managed-property>
    <managed-property>
    <property-name>outcome</property-name>
    <value>linkToManageFlexSystem</value>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <description>Root menu item for flex system management</description>
    <managed-bean-name>menu_menuitem_FlexSystem_Root</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuItem</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>children</property-name>
    <list-entries>
    <value-class>flex.view.util.MenuItem</value-class>
    <value>#{menu_menuitem_FlexSystem_Create}</value>
    <value>#{menu_menuitem_FlexSystem_Manage}</value>
    </list-entries>
    </managed-property>
    <managed-property>
    <property-name>label</property-name>
    <value>#{resources['menu.FlexSystem.menuItem.root']}</value>
    </managed-property>
    </managed-bean>
    <application>
    <message-bundle>flex.view.resources.MenuFlexSystemProperties</message-bundle>
    <locale-config>
    <supported-locale>fr_CH</supported-locale>
    </locale-config>
    </application>
    <managed-bean>
    <managed-bean-name>resources</managed-bean-name>
    <managed-bean-class>flex.view.util.ResourceAdapter</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/FlexHome.jspx</from-view-id>
    <navigation-case>
    <from-outcome>linkToCreateNewFlexSystem</from-outcome>
    <to-view-id>/CreateNewFlexSystem.jspx</to-view-id>
    </navigation-case>
    </navigation-rule>
    <navigation-rule>
    <from-view-id>/FlexHome.jspx</from-view-id>
    <navigation-case>
    <from-outcome>linkToManageFlexSystem</from-outcome>
    <to-view-id>/ManageFlexSystem.jspx</to-view-id>
    </navigation-case>
    </navigation-rule>
    <managed-bean>
    <managed-bean-name>menu_FlexSystem</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuTreeModelAdapter</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>childProperty</property-name>
    <value>children</value>
    </managed-property>
    <managed-property>
    <property-name>listInstance</property-name>
    <list-entries>
    <value-class>flex.view.util.MenuItem</value-class>
    <value>#{menu_menuitem_FlexSystem_Root}</value>
    <value>#{menu_menuitem_FlexSystem_Root}</value>
    </list-entries>
    </managed-property>
    </managed-bean>
    <managed-bean>
    <managed-bean-name>menuModel</managed-bean-name>
    <managed-bean-class>flex.view.util.MenuModelAdapter</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <property-name>viewIdProperty</property-name>
    <value>viewId</value>
    </managed-property>
    <managed-property>
    <property-name>instance</property-name>
    <value>#{menu_FlexSystem.model}</value>
    </managed-property>
    </managed-bean>
    </faces-config>

  • More than one faces-config.xml

    hi!
    i am working in a big team, and would like to create more than one faces-config.xml file.
    is it possible? how?

    Yes!! You can create multiple faces-config.xml files.
    Make changes in your deployment descriptor to include multiple faces config files:
    <context-param>
         <param-name>javax.faces.CONFIG_FILES</param-name>
         <param-value>/WEB-INF/config/faces-config-one.xml,
         /WEB-INF/config/faces-config-two.xml,
         /WEB-INF/config/faces-config-three.xml,
         /WEB-INF/config/faces-config-four.xml</param-value>
    </context-param>When there are too many modules, with many people working on the project simultaneously, having multiple faces config files makes it a lot more easier to manage.

  • Bug in faces-config.xml parser?

    According to the spec, the FactoryFinder is supposed to call the one-arg constructor taking the Abstract factory. For instance, I have this factory class:
    public class ExtendedLifecycleFactory extends LifecycleFactory {
      public ExtendedLifecycleFactory(LifecycleFactory base) {
        // this is supposed to be called by the FactoryFinder
      public ExtendedLifecycleFactory() {
        // this is not
    }And I have the following definition in my faces-config.xml:
    <faces-config>
      <factory>
        <lifecycle-factory>com.foo.ExtendedLifecycleFactory</lifecycle-factory>
      </factory>
    </faces-config>For some reason, my one-arg constructor isn't being called.
    According to the FactoryFinder source, it appears that it maintains an internal list of all of the factories of a given type passed to it via the setFactory() method. Then, it starts at the last entry in the list (which should be the default implementation) and iterates through to the first one passing the previous implementation to each one in the iteration. Here is pseudo-code:
    Factory prev = list.get(list.size() - 1);
    for (int i = list.size() - 2; i >= 0; i--) {
      prev = callOneArgFirstAndNoArgSecond(list.get(i), prev);
    return prev;When I debugged the FactoryFinder, it appears that the parser for the faces-config.xml file never calls FactoryFinder.setFactory() with the default implementation. It seems that this is a bug since the JSF 1.0 spec lists this as the last step in finding a factory for the faces application.
    Am I correct in this assumption?
    I'm hoping Craig will answer this one as I've thoroughly done my homework! :-)

    Hello,
    Yes, you are correct, this was a problem with the 1.0 RI and has been corrected.
    This fix will be made available with the next release.

  • Changing faces-config.xml after deploying ear file

    Hi,
    What would be the steps to follow if we want to change contenets of web application configuration files (for example, faces-config.xml) after app.ear file has been deployed?
    The app.ear file contains the faces-config.xml, and we are using Oracle AS 10.1.3.
    Thanks,
    Jean

    see my answer at
    Change web app config file of deployed app

  • How to configure multiple jsp files with diff beans in faces-config.xml??

    Hi All,
    I have 2 seperate jsp pages one is a login page and the other is the main application page.Now i am handling both the pages with seperate Bean class with respective setter and getter methods.How can i state the same in faces-config.xml file???..
    Is the below way correct???
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config version="1.2"
        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_1_2.xsd">
        <managed-bean>
                <managed-bean-name>LoginForm</managed-bean-name>
                <managed-bean-class>useraccess.LoginForm</managed-bean-class>
                <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
        <navigation-rule>
                <from-view-id>/login.jsp</from-view-id>
            <navigation-case>
                <from-action>#{LoginForm.CheckValidUser}</from-action>
                <from-outcome>success</from-outcome>
                <to-view-id>/success.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-action>#{LoginForm.CheckValidUser}</from-action>
                <from-outcome>fail</from-outcome>
                <to-view-id>/fail.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
        <managed-bean>
                <managed-bean-name>DSRApplication</managed-bean-name>
                <managed-bean-class>DSRApplication.LoginForm</managed-bean-class>
                <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
        <navigation-rule>
                <from-view-id>/DSR.jsp</from-view-id>
            <navigation-case>
                <from-action>#{DSRApplication.checkValidDateInAllFields}</from-action>
                <from-outcome>alldatasuccess</from-outcome>
                <to-view-id>/success.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-action>#{DSRApplication.checkValidDateInAllFields}</from-action>
                <from-outcome>datafail</from-outcome>
                <to-view-id>/fail.jsp</to-view-id>
            </navigation-case>
        </navigation-rule>
    </faces-config>Thanks in advance to all.
    regards,
    Viswanadh.

    Thanks ejp for the reply.
    Since i am a beginner even i dont know the exact reason to answer you for why am i using JSP with Facelets.Kindly provide me the suggestion and valuable information you have so that i can learn.
    Apart from this i want to know whether the way provided in that faces-config.xml is possible or do we have a way to make that possible???
    regards,
    Viswanadh.

  • How to specify multiple message bundles in faces-config.xml

    Hi
    I have different properties file which I want to use as message bundle.
    Message.properties
    Help.properties
    When I specify this in faces-config.xml
    <application>
    <message-bundle>/Message</message-bundle>
    <message-bundle>/Help</message-bundle>
    </application>
    and now when I try to use that in my jsp page like this
    <f:loadBundle basename="/Message" var="message"/>
    <f:loadBundle basename="/Help" var="help"/>
    and access any messagestring from those files I can not excess either of them. But when I use only one of them it works fine.
    Am I doing something wrong or I can not do this thing at all??
    Thanks in advance.

    I only specify one properties file in the <application> tag. That one is used for system messages. I have other properties files for labels, and another for just standard app text, so in my faces-config.xml I have something like this:
    <application>
    <message-bundle>message</message-bundle>
    <locale-config>
    <default-locale>en</default-locale>
    </locale-config>
    </application>
    where my message.properties is used for system messages (validation, etc).
    I don't list the other property files there. I have two more that I use, labels_en.properties, and standard_en.properties. Labels are words that have a : at the end or a *: for required fields. Standard are just other words that I use in my application. So on every page that I have, I start out with the following header:
    <html>
    <f:view locale="en_US">
    <head>
    <f:loadBundle basename="label" var="label"/>
    <f:loadBundle basename="standard" var="standard"/>
    <title>
    .....

  • Splitting faces-config.xml into multiple parts

    Hey Everybody,
    I'm trying to split up my faces-config.xml file into application specific and deployment specific parts. I've managed to everything set-up so far but I'm having a problem with beans. I've got a bean which contains most of the application specific attributes but the problem is that some of the attributes are deployment specific and some are application specific.
    In the past, I could get around this by having two faces-config.xml files which each defined the bean but only specified "their" attributes. But I've now found that I can only define the bean only once. The bean will get the attributes from one file but not the other. So how can I get around this? Could I do a faces-config.xml include statement? Do I have to create a deployment-specific bean?
    Mark

    We have been referencing the same managed bean in different faces-config.xml files for a couple of years and it really did work until the latest release of JDeveloper. What we had been doing was to put properties that would change between the development and deployed versions in different faces-config.xml files; the goal being to isolate all the properties that needed to be changed for deployment in a single file that we could automatically replace with Ant when we build the production release.
    But just because it worked in the past doesn't mean that it was supposed to work.
    Thanks,

  • What is the rule for adding application elements to faces-config.xml

    I have posed this question before, but was unable to get an answer so here goes again.
    What is the rule for adding more than one application element to the faces-config.xml?
    The schema documents that 1-n are possible, but why and when should I do this?
    --W                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    sorry if you don't login in tomcat administration before. you must enter login and password of a manager user on tomcat .
    The user is the one you give when installing tomcat.
    If you have forgotten it : see it to: C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\tomcat_users.xml
    and choose one whop have role='manager'

  • Question for faces-config.xml

    How can I make <redirect/> as the default behavior in the faces-config.xml?
    Thanks.
    Shawn

    Thanks Frank.
    JSF 2.0 has introduced a new scope, flash scope, for just such a requirement. With the flash scope, the request scoped variables are available after a redirect. Variables in the Flash scope are available for the subsequent request and then cleared.

  • Forward to Tiles definition from faces-config.xml

    Hello,
    can anybody explain me how to make a forward to a Tiles definition from the faces-config.xml file? I�m using MyFaces with Tomahawk and Tiles, but I also tried with Jsf without myFaces and lots of combinations but I can�t fix it.
    Here is my faces-config file:
    <faces-config>
    <navigation-rule>
    <from-view-id>/pages/JP000.jsp</from-view-id>
    <navigation-case>
    <from-outcome>loginFrm</from-outcome>
    <to-view-id>/JP002.tiles</to-view-id>
    </navigation-case>
    </navigation-rule>
    <application>
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>
    </application>
    </faces-config>
    and this is the tiles-defs.xml:
    <tiles-definitions>
         <!-- === layouts === -->
         <definition name="general.menu"
              path="/pages/tiles/templates/general.menu.jsp">
              <put name="titleHTML" type="string"     value="mi_title" />
              <put name="menu" value="/pages/tiles/menu.jsp" />
         </definition>
         <!-- === pages === -->
         <definition name="JP002.tiles" extends="general.menu">
              <put name="titleHTML" type="string"     value="mi_title" />
              <put name="content" value="/pages/menus/JP002.jsp" />
              <put name="menu" value="0" />
         </definition>
    </tiles-definitions>
    Lots of thanks!!!!

    Today I downloaded tomahawk-examples-1.1.5-bin. (http://myfaces.apache.org/download.html). They have one example with tiles, and it works the way I want it to.
    I'm still trying to figure it out what is causing this behaviour.
    At least, I tried to change the value they're using for linkage between <to-view-id> and tiles definition, and found that JSF is still ignoring the real value in <to-view-id>
    : it was originally 'blah.jsp', but 'blah' or 'blah.tiles' worked the same way, while in tiles definition the corresponding name was always blah.tiles.
    It seems that they are looking into tiles definitions first with the key composed of the first part of the value in <to-view-id> (before the dot) concatenated with hardcoded '.faces'.
    I tried to change the key value in both config files to something like 'blah.ttt', and it did not work.
    I'm not sure at the moment if this would be a problem for me, I may use this framework, knowing the limitations.
    Also, I'll look into the code, if this may be altered and at what cost.
    Still, the basic jsf problem with always interpreting the value in <to-view-id> as blah.jsp remains.

  • Can I use morethen one faces-config.xml

    HI,
    now I am learning jsf, I have a doubt that ,can I use more than on faces-config.xml in one application ? and can we cahange name of faces-config.xml to faces-config-first.xml, and faces-config-second.xml? if it is possible , what should i do?
    Thank&Regards
    satya..

    Why would you want multiple config files? Is it for organization only...
    How would your app. know the when to use a different config file?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                       

  • Localization of adf faces-config.xml

    I have defined my ADF process train component and menu items in my faces-config.xml. The definition has got the label for these components in the faces-config.xml How can I localize these labels so that I can support multiple languages. The managed bean for my process train component is
    <managed-bean>
    <managed-bean-name>customerInfo</managed-bean-name>
    <managed-bean-class>view.faces.menu.PersonalTrackerMenuItem</managed-bean-class>
    <managed-bean-scope>none</managed-bean-scope>
    <managed-property>
    <property-name>viewId</property-name>
    <value>/customerinfo.jsp</value>
    </managed-property>
    <managed-property>
    <property-name>label</property-name>
    <value>Customer Information</value>
    </managed-property>
    <managed-property>
    <property-name>outcome</property-name>
    <value>guide.customerinfo</value>
    </managed-property>
    </managed-bean>
    I would like to know how to get the Customer Information label from a properties file instead of hardcoding it in the faces-config.xml

    Hi Frank
    Thanks for your response. I understand that we need to use different locales but for this to work all the labels need to be parameterized to the properties file. This is straight forward when it comes to labels in the JSP pages where we load the bundle with
    <f:loadBundle basename="myBundle.myBundle" var="sampleBundle"> and refer to a property as <f:commandButton value="#{sampleBundle.myButtonText}"/> my problem is how to do this when the label I want to parameterize is in the faces-config.xml

  • Warnings in faces-config.xml

    I've had to reinstall JDeveloper in the middle of trying to follow the 'Oracle Application Development Framework Tutorial', which shouldn't be a problem, since I just recreated the connection to my database and unzipped the appropriate file (starterApplications/SRDemo-EndOfChapter6.zip). However, there are a number of oddities, so maybe I haven't quite done it the right way:
    1. When I open the faces-config.xml, I see 19 warnings in 'Structure' - they are all about files 'not found under root .../public_html' - I suspect this may be the explanation for the next problem:
    2. The Diagram window is blank; can I do some magic to get it to appear or is this something I will have to recreate manually? Or is there something that I haven't installed (as suggested by the first problem)?

    madhavarvr wrote:
    but i am unable to load the pages also.You probably should have mentioned this to begin with.
    i am getting
    Jun 23, 2008 9:37:31 AM com.sun.faces.config.rules.NavigationRuleRule end
    WARNING: [NavigationRuleRule]{faces-config/navigation-rule} Merge(/pages/inputname.jsp)
    Jun 23, 2008 9:37:31 AM com.sun.faces.config.rules.ManagedBeanRule end
    WARNING: [ManagedBeanRule]{faces-config/managed-bean} Merge(person)
    Ignore these.
    error and the pages also not displaying. Please describe what you are doing, what actually happens and what you expected to happen. You might benefit from reading the following:
    http://www.catb.org/~esr/faqs/smart-questions.html
    >
    my faces-config.xm is:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config >
         <navigation-rule>
              <from-view-id>/pages/inputname.jsp</from-view-id>
              <navigation-case>
                   <from-outcome>greeting</from-outcome>
                   <to-view-id>/pages/Greeting.jsp</to-view-id>
              </navigation-case>
         </navigation-rule>
         <managed-bean>
              <managed-bean-name>person</managed-bean-name>
              <managed-bean-class>com.madhu.PersonBean</managed-bean-class>
              <managed-bean-scope>session</managed-bean-scope>
         </managed-bean>
    </faces-config>

Maybe you are looking for