Multiple faces-config files

can i have more than one faces-config.xml files in one web application ...
e.g. I have my custom configs defined in my-faces-config.xml and I am using third party components whose configs are specified in their-faces-config.xml
Can both of these co-exist? If yes, how can I go about doing that?
Thanks.

Yes ... you've got a couple of things you can do to accomplish this.
First, you can create a comma-delimited list of paths to faces-config.xml files in your context init param named "javax.faces.application.CONFIG_FILES". So, your apps own settings can be divided as needed.
Second, every JAR file in your /WEB-INF/lib directory will be searched for a "META-INF/faces-config.xml" file at application startup time. If such a file is found, it will be processed automatically. This is designed to make it easy to build a third party library JAR containing components, renderers, tags, etc. and their configuration information, and be able to use those things simply by dropping the JAR inside your webapp.
Note that TLDs under META-INF/tld are automatically recognized in the same way, so tag libraries can be self-registering as well.
Craig

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

  • Issues using multiple load-config files with ant

    Hello,
    Not sure if this is the correct place...
    I am creating an ant build script to compile our flex application. I am trying to use the default flex-config by doing <load-config filename="${flex.sdkPath}/frameworks/flex-config.xml"/> and project specific config file add the datavisualization module and any other libraries we might need in the future. I am trying to do this as I don't want to modify the flex-config.xml
    The issue I keep running into is I get a compiler error saying "unable to locate specified base class 'spark.comonents.application..". if I place the custome load-config file above the adobe default flex-config it gives errors stating it the "SeriesSlide" type
    <mxmlc file="${project.sourcePath}/FBApp.mxml"
             output="${project.output.binaryPath}/${project.output.fileName}.swf"
             locale="en_US"
             static-link-runtime-shared-libraries="false"
             static-rsls="false"
             use-network="true"
             accessible="false"
             debug="true">
             <load-config filename="${flex.sdkPath}/frameworks/flex-config.xml"/>
             <load-config filename="C:/Hudson/.hudson/jobs/FB 2.0 Flex/workspace/FBApp/FB-config.xml"/>
             <source-path path-element="${flex.sdkPath}/frameworks/libs"/>
             <source-path path-element="${project.sourcePath}"/>
             <library-path dir="${flex.path}/sdks/${flex.sdkVersion}/frameworks/locale/en_US"
                includes="*"/>
             <library-path dir="${project.libraryPath}"
                includes="*"/>
             <keep-as3-metadata name="Protected"/>
          </mxmlc>
    the following is my FB-config.xml
    <?xml version="1.0"?>
    <flex-config>
       <runtime-shared-library-path>
    <path-element>C:\Program Files\Adobe\Adobe Flash Builder 4 Plug-in\sdks\4.1.0\frameworks\libs/datavisualization.swc</path-element>
    <rsl-url>http://fpdownload.adobe.com/pub/swz/flex/4.1.0.16076/datavisualization_4.1.0.16076.swz</rsl-url>
    <policy-file-url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</policy-file-url>
    <rsl-url>datavisualization_4.1.0.16076.swz</rsl-url>
    <policy-file-url>.</policy-file-url>
       </runtime-shared-library-path>
    </flex-config>
    It seems to be that the first "load-config" ant runs into is the only one that gets used. When looking around the internet I have multiple cases of where people say they have successfully used multiple load-config files.
    This one in particular.
    http://flashdevelop.org/community/viewtopic.php?f=13&t=5629&view=previous
    If I had to guess on what was wrong I believe my FB-config.xml file is incorrect but I can't find an example of anyones custom configuration file.
    Any guidance would be apprecaited.

    I am embarrassed to say that your solution answered my question.
    I was about 10 min away from rewriting my Ant script to just use the mxmlc.exe directly instead of the mxmlc ant tag. I kept running into the -flex-config+=YourConfig.xml for the command line option but never saw the xml variant.
    http://blog.flexexamples.com/2008/12/21/using-a-custom-flex-configxml-file-in-flex-builder -3/
    http://livedocs.adobe.com/flex/3/html/help.html?content=configuring_environment_3.html
    Does Flex have any documenation that shows all the different tags that are available like the Ant documenation?
    http://ant.apache.org/manual/Tasks/delete.html
    Thanks at ton.

  • 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

  • Running faces config file without using internet

    hi
    i m new to JSF
    how i can run faces config file without using live internet
    i have put "web-facesconfig_1_1.dtd" file at local path
    while i run the jboss,it will throw exception of fileNotFoundException

    Which version of JBoss are you using? I have successfully run 4.2.x off the grid but I typically use schema:<faces-config 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"
                  version="1.2">Note that I did not need to obtain copies of the files myself for use locally.

  • 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>

  • JDeveloper 10.1.3 Bug With Multiple JSF Config Files?

    There seems to be a problem with JDeveloper 10.1.3 when you have multiple JSF configuration files. I have three configuration files created for a JSF application. One file contains navigation cases, a second file contains the managed beans, and a third file consists of the regular faces-config.xml file.
    When you are working with a backing bean in JDeveloper, it seems to have a nasty habbit of sticking a "new" managed bean definition for the backing bean you are working on in the faces-config.xml file.

    Good point. We'll try to address this in the production release of 10.1.3.
    Thanks,
    Rod

  • Common Beans Faces Config (File Location)

    If you have a project with multiple JHeadstart App Definitions, what is the consequence of setting the 'Common Beans Faces Config' to a diffrent location for each App Def?
    e.g./WEB-INF/<subsystem>/JhsCommon-beans.xml
    Inside web.xml, javax.faces.CONFIG_FILES lists each of the separate JhsCommon-beans.xml files.
    I note that the help says this property should be set to the 'same across all application definition files'.
    JHeadstart 10.1.3

    Tom,
    1) On pressing find we notice the following (debug
    mode)
    -performs count hits query (e.g. 6 secs, a slow
    query!)
    -performs the main VO query with order by (again 6
    secs)
    -ripples through the label fetching (from bundles 3
    including jhs and javax)
    -once again, after the clear button label and before
    save button label (i.e. where table would be
    rendered), another count hits query (again 6 secs)
    total about 18 secs
    Any idea how to prevent the count hits (both)?Tom, I did the following: overwrite method getQueryHitCount in my ViewObjectImpl class, and set a breakpoint on the call to super. When I click find in a page, the method gets called through JhsSearchBean.executeAdvancedSearchBinding to determine whether any rows will be returned ro conditionally show the "Now Rows found"message, and whether the number of rows does not exceed the max number of query hits allowed.
    Then, if the query returns more rows than the rangeSize, the ADF Faces Table renderer calls the method again.
    So, I have either 1 or 2 calls to this method, not 3. The ADF Faces call canot be prevented, you could overwrite JhsSearchBean.executeAdvancedSearchBinding and remove the functionality that uses the getEstainmtaedRowCount call.
    To figure out why in your situation the method gets called 3 times, you can do the same as I did, overwrite getQueryHitCount and put a breakpoint on it.
    >
    2) For label fetching I note that the query labels
    are fetched twice (consequtively). Not sure what
    calls getMessage, but puzzled that it calls these
    labels twice, only once for the table column labels.This ADF Faces table rendering internals, nothing we can do about that.
    >
    3) One of the fields, FIND_STATUS is an
    af:selectOneChoice, with
    unselectedLabel="#{nls['UNSELECTED_LABEL']}", so this
    is translated.
    In addition the table has a field TABLE_STATUS, with
    same configuration.
    This second field as just displayed (not updateable),
    but if blank then the 'UNSELECTED_LABEL' translation
    is attempted for each row.
    Can JHeadstart control this to avoid this translate?
    i.e. the amount of translation is now row count and
    data dependent.Same as 20, This ADF Faces table rendering internals, nothing we can do about that.
    Steven Davelaar,
    JHeadstart Team.

  • Combining multiple cache config files?

    In Coherence v3.5 and prior it doesn't appear that there is a way to combine cache-config.xml files, for example by inclusion (which is possible for pof-config.xml files) or perhaps by specifying a list of cache config files to the "-Dtangosol.coherence.cacheconfig" JVM argument.
    I may have just missed that capability, so can you confirm whether there is any way to combine cache-config fragments in v3.5? If not, will there be in 3.6 or some later version?
    Thanks,
    Dave

    Hey,
    You may want to look Coherence Common http://coherence.oracle.com/display/INCUBATOR/Coherence+Common
    This specifically, http://coherence.oracle.com/display/INCUBATOR/Extensible+Environments+-Introductionto+Namespaces+(1.6.0)
    Regards,
    Nick

  • How to call a bean method in the faces-config file?

    Hi,
    I would like in my menu to call the method of a bean (it initialize some properties before opening the page) instead of opening directly the page, by I can't find how to do that.
    I tried :
    <managed-property>
    <property-name>viewId</property-name>
    <value>#{listInformationsController.listInformations}</value>
    </managed-property>
    And :
    <managed-property>
    <property-name>outcome</property-name>
    <value>#{listInformationsController.listInformations}</value>
    </managed-property>
    With no success...
    Can someone help me?
    Thank you and merry christmas !

    Hi,
    a managed property only gives you a anlde to a bean or property, it doesn't execute it. To execute a bean, you can use a custom JSF PhaseListener that calls a bean method. The reference to the bean is achieve through value binding
    ValueBinding vb = FacesContect.getCurrentInstance().getApplication().createValueBinding("Name of Managed Bean);
    TypeOfBean theBean =(TypeOfBean) vb.getValue(FacesContext.getCurrentInstance());
    .... theBean.theMethod() ...
    Frank

  • 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.

  • Faces-config.xml is the only configuration file or we can keep more

    Hi All,
    1) faces-config.xml is the only name specification allowed in JSF for configuration file or can we use another name for this configuration (like as struts) ?
    2) can we have multiple configuration files in JSF like as struts contains multiple configuration files for navigation ?
    Thanks,
    Rajesh Yarlagadda

    http://one-size-doesnt-fit-all.blogspot.fi/2007/01/using-multiple-faces-configxml-files-in.html
    Edited by: Nik on Sep 25, 2012 1:13 AM

  • ADF faces-config.xml file

    Hi ADF gurus,
    I am new to this technology and i have found in oracle developer's guide that "Registering managed beans within the faces-config.xml file is not recommended in a Fusion web application".
    URL : http://docs.oracle.com/cd/E28271_01/web.1111/e28164/web_getstarted.htm#CACCFIII
    Section: Using a Managed Bean in a Fusion Web Application
    My question is why this?
    Thanks & Regards,
    Sharmistha

    If you plan to use the ADF stack there are some enhancements added to the normal faces lifecycle like bounded task flows, pageFlowScope and some additional phases the normal faces lifecaycle doesn't have. This additions are handled in the adcf-config.xml. If you register your beans in the facces-config file they are not managed by the adf stack and therefore can't use the additions.
    So Oracle encourage you to use the adfc-config.xml instead of the faces-config.xml. There are a few special entries which still needed to be made in the faces-config file (e.g. skinning), butin general you use the adfc-config file is you use adf rich faces.
    Timo

  • Faces-config as file resource?

    Is it possible to use a faces configuration file stored on the server, instead of in the WEB-INF directory? I'd like to store some server specific settings in our dev and QA environments and have my JSF app look them up something like this:
    Web.xml
    <context-param>
            <param-name>javax.faces.CONFIG_FILES</param-name>
            <param-value>/WEB-INF/business-config.xml,
                /WEB-INF/correspondence-config.xml,
                /WEB-INF/insurance-config.xml,
                /WEB-INF/website-config.xml,
                file:C:\tomcat-5.5.17\conf\test-config.xml
            </param-value>
    </context-param>I've tried the above example and I received an error (ERROR - Faces config resource C:\tomcat-5.5.17\conf\test-config.xml not found).
    I'm sure that others have this requirement and I'm wondering how you managed it.
    Thanks

    You could store the faces-config file in the META-INF directory of a JAR file that is installed in the servers of the Dev/QA environments.

  • JDeveloper 11.1.2.4: Is it possible to only display custom validator IDs defined in faces-config.xml

    I have many custom validators and do not need to see the default values as listed in the below screen shot:
    http://i.imgur.com/xOQgxeZ.png
    Is it possible to only show the custom validators I define within faces-config.xml?
    Thanks,
    Wes

    Deepak,
    don't understand this sentence:
    "Do not specify the binding attribute value in the f:validator tag for the bindings not to display."
    Wes,
    The answer to the question seems to be "no" you cannot suppress the other validator entries as they too are configured in a faces config file - though not the one in the application
    Frank

Maybe you are looking for

  • Iphone 4 apps do not download

    I try to download an app and it says "waiting" for 3 seconds then disappears. EVERY TIME. I tried creating a new account, restarting phone, checking for software update, lots of different apps, on full 3G service, fast wifi network, nothing works. I'

  • Trying to get number of rows in recordset but getRow( returning -3)

    Hi all, I really hope someone here will be able to help me with this, it is driving me mad. I have a query that is returning records within SQL Server, and i am trying to get the number of records returned for checks within my code. this is what i ha

  • TEM Workflow for "Approval of Employee's attendance booking"

    Dear All, Is there any special configuration point, which I may be missing on, in order to trigger the standard workflow   " Approval of Employee's Attendance Booking" thru ESS (t-code: PV7I) The problem that I am facing is that the workflow is not g

  • How can I use srvctl command line for change "Failover type" and "F method"

    Hi all, I am using Oracle One Node (11.2.0.3), and I have a service: /u01/11.2.0/grid/bin/srvctl config service -d orcl Service name: orcldb Service is enabled Server pool: orcl Cardinality: 1 Disconnect: false Service role: PRIMARY Management policy

  • Installing and Configuring Microsoft IIS plugin for weblogic server

    Hi guys, I want to navigate from "a page in website hosted on IIS" to "a page in application hosted on weblogic". I found out that there is a plugin for Microsoft IIS that can proxy requests to weblogic server. The documentation of the plugin can be