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                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Can i make more than one faces-config.xml file ?

    Can i make more than one faces-config.xml file under one project or application, if yes than how it will link.

    Just that you know,
    In the second week of july I was taking the Jdeveloper/Jheadstart course at Oracle Netherlands. During that course we were asked to split the faces-config. After splitting it, we were not able to find the navigation rules that were defined in the first faces-config in the web.xml. The Jdeveloper IDE was confused........
    However, we were able to use the navigation rules (type in manualy) and that worked in the application.
    I talked about it with Steven Davelaar and he thought it might be a bug. I don't know if it's reported, and I don't know if it's fixed.
    So, if you get confused.... it works, but Jdeveloper might have some problems with it.
    Luc Bors

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

  • When To Use redirect/ In faces-config.xml

    In what situations should I use <redirect/> in faces-config. I understand what that using it causes it to generate a HTTP redirect instead of redirection through the view handler.
    I have ran into situations where if I don't use redirect, evein in a request scoped bean data isn't completely cleared out of a form. IE I have a list of users with a list of their addresses. If I look at an address on user 1 I see the right details, if I then move to user2 and look at one of his addresses it reflects the information from user1. As soon as I add <redirect/> the problem disappears.

    You normally use it to fire a brand new request.
    If I look at an address on user 1 I see the right details, if I then move to user2 and look at one of his addresses it reflects the information from user1. As soon as I add <redirect/> the problem disappears.This rather sounds like faulty code logic. Debug it.

  • How to use requestScope in faces-config.xml file?

    a managed-bean need get value from request as its property
    so i configure the manged-bean as below:(use requestScope object)
    <managed-bean>
    <description>this is for item test bean.</description>
    <managed-bean-name> item </managed-bean-name>
    <managed-bean-class> test.Item </managed-bean-class>
    <managed-bean-scope> request </managed-bean-scope>
    <managed-property>
    <property-name>id</property-name>
    <value-ref>requestScope.id</value-ref>
    </managed-property>
    </managed-bean>
    but it didnot work.
    after i restart tomcat with above configure file, it report
    HTTP Status 404 error.
    and seemed that the context donot start...
    if i change the line
    <value-ref>requestScope.id</value-ref>
    to:
    <value>7</value>
    then everything will be OK...but this isnot fit my require.
    any body can help me?
    I use JSF 1.0 beta.

    Rather than starting a new thread, I thought I'd just add on to this one, since it already lays the grounds for my question. I'm using the
    I noticed that my setId() method is being called once during the ApplyRequestValuesPhase, and then again in the UpdateModelValuesPhase. The first time, it sets the ID to null, despite the fact that I'm posting an id to the page. When it comes around the second time, it sets the id properly, and the data is loaded from the database and everything works great. If I'm not posting anything to the page, it is only hit once and the value is null.
    Normally I wouldn't fuss over such small things like this, but there's a bit of a probelm. I have a few buttons which are rendered based on this id. If the id is zero (i.e. null or empty string is passed into the setId() method), I want the add button to appear, else I want the update/delete/cancel buttons to appear. If any of these buttons are false after the ApplyRequestValuesPhase, the button's action will not be executed. In other words, when I'm editing an entry and I press the update button the life cycle goes a little like this...
    Object constructed
    ApplyRequestValuesPhase calls setId(null),add button to be rendered, update/delete/cancel to not be rendered
    // the call to save() is not queued up! (save() is the method associated with the action of my update button)
    UpdateModelValuesPhase calls setId("34"), data loaded from database, add button is not to be rendered, update/delete/cancel are to be rendered
    Since save() is never called, it renders the data loaded from the database, and the update/delete/cancel buttons are shown. So, from the user's perspective... nothing happened other than a page refresh. A.k.a. the update button is broken!
    I can, of course, choose to not update the boolean flags which determine if the buttons are rendered or not when setId() is called with a null. Since the default is to render everything (which was a decision specifically to avoid the buttons not being rendered in the early stages of the JSF life cycle, and the action not being executed). That works when I post an id to the page because it's called a second time and the correct buttons are rendered. The problem is when no parameters are given... it isn't called a second time, so it renders all buttons when I only want it to render the add button.
    So how can I get the values to post during the ApplyRequestValuesPhase? I thought that would be how it would work, but apparently not. Anyone know why it explicitly sets the id to null the first time aroud?
    Here's all you should need...
        <managed-bean>
            <managed-bean-name>dropdownEntry</managed-bean-name>
            <managed-bean-class>org.dc949.bugTrack.DropdownEntry</managed-bean-class>
            <managed-bean-scope>request</managed-bean-scope>
            <managed-property>
                <property-name>id</property-name>
                <value>#{param.id}</value>
            </managed-property>
        </managed-bean>
        public void setId(String id) {
            try {
                this.id = Long.parseLong(id);
                load();  // loads data from DB
            } catch(Exception e) {
                if(id != null && !id.equals(""))
                    log.warn("Unable to convert id from String to long ("+id+")", e);
            if(id != null) {  // this was my solution while I was frusterated that my save method wasn't being called
                if(this.getIdAsLong() == 0) {
                    this.showAdd = true;
                    this.showUpdate = false;
                    this.showDelete = false;
                } else {
                    this.showAdd = false;
                    this.showUpdate = true;
                    this.showDelete = true;
                        <t:div>
                            <h:commandButton id="add" value="Add dropdown entry"
                                             rendered="#{dropdownEntry.showAddButton}"
                                             action="#{dropdownEntry.save}" />
                            <h:commandButton id="update" value="Update dropdown entry"
                                             rendered="#{dropdownEntry.showUpdateButton}"
                                             action="#{dropdownEntry.save}" />
                            <h:commandButton id="delete" value="Delete dropdown entry"
                                             rendered="#{dropdownEntry.showDeleteButton}"
                                             action="#{dropdownEntry.deleteDropdownEntry}" />
                            <h:commandButton id="cancel" value="Cancel"
                                             rendered="#{dropdownEntry.showUpdateButton}"
                                             action="#{dropdownEntry.reset}" immediate="true" />
                        </t:div>I could, and probably will get rid of the showDeleteButton flag and isShowDeleteButton() method and make it like the cancel button since these update/delete/cancel will always be shown/hidden together.
    Edit: Now I feel like a fool. A little clean and build, and it's working perfectly. If any one of the above people read this, I thank you for your help from years past. <img class="emoticon" src="images/emoticons/happy.gif" border="0" alt="" />
    Edited by: AdamNichols on Apr 18, 2008 9:57 PM

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

  • Studio creator and faces-config.xml

    How can I configure Sun Studio Creator to use /WEB-INF/faces-config.xml for all configuration items. Currently navigation and managed beans are seperated into 2 files. I have a bunch of JSF application with using another tool that I would like to test editing using Studio Creator but the Sun Studio Creator ignores the faces-config.xml for the navigation editor and managed bean editor.

    Hi ,
    The follwing link may probably answer your query.
    http://swforum.sun.com/jive/thread.jspa?threadID=50215&tstart=15
    Regards.,

  • 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

  • Component and renderer can't share the same name in face-config.xml

    Hi All,
    I've noticed that a component and a renderer can't share the same name in <face-config.xml>.
    For instance,
    <component>
    <component-type>tree</component-type>
    <component-class>com.xxx.tree.component.Tree</component-class>
    </component>
    <render-kit>
    <renderer>
    <renderer-type>tree</renderer-type>
    <renderer-class>com.xxx.tree.renderer.Tree</renderer-class>
    </renderer>
    </render-kit>     
    generates a cryptic error message.
    It's not a big deal but would be nice to support it.
    The workaround of course is to use a different name for the component and renderer (tree and treeRenderer for instance)
    Stephane

    i dont know why it doesn't work for you. It works for me alright. Can u elaborate on what error messages you are getting? It maybe some other problem.

  • Problem w.r.t. JSF 2.0 with faces-config.xml

    Hi All,
    I am trying to evaluate the features of JSF2.0.
    For that, I have created a very simple application with "JSF 2.0.2".
    There is a page that displays a composite component and some other form related components (inputtext, commandbutton).
    When I deploy my application without any faces-config.xml file, everything renders perfectly fine.
    When I deploy the app with faces-config.xml (even an empty one without any configuration), none of the components get rendered.
    Only the html elements get displayed.
    I need to define some navigation-rules in my config file. I am not sure how to go further from here.
    The app server I am using for deploying my app is GlassFish(v3).
    Any help or pointers towards solving my problem are highly appreciated.
    You can find the xhtml file, etc of my project below.
    Thank you,
    With best regards,
    Praveen
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 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-app_2_5.xsd" version="2.5">
         <context-param>
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
              <param-value>.xhtml</param-value>
         </context-param>
         <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.jsf</url-pattern>
         </servlet-mapping>
    </web-app>
    faces-config.xml
    <?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 xmlns="http://java.sun.com/JSF/Configuration">
    </faces-config>
    resources->acicomp->namesection.xhtml
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:composite="http://java.sun.com/jsf/composite">
    <composite:interface>
    </composite:interface>
    <composite:implementation>
         <h:panelGroup>
         <h:panelGrid columns="2">
              <h:outputText value="Name: "/>
              <h:inputText value="myName"/>
              <h:outputText value="Company: "/>
              <h:inputText value="myComp"/>
         </h:panelGrid>
         </h:panelGroup>
    </composite:implementation>
    </html>
    index.xhtml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:aci="http://java.sun.com/jsf/composite/acicomp">
    <h:head>
         <title>JSF Test Program</title>
    </h:head>
    <h:body>
         <p>My Simple Test Program</p>
            <h:form id="testForm" >
                <p>TEST</p>
                <aci:namesection></aci:namesection>
                <h:inputText id="username" value="John" />
                <h:commandButton id="submit" action="response" value="Submit"/>
            </h:form>
    </h:body>
    </html>

    I found the problem.
    The dtd location of the faces-config.xml had to be changed. It was pointing to the schema of 1.1.
    With the following faces-config.xml, my application worked perfectly fine.
    <?xml version="1.0"?>
    <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_2_0.xsd"
                  version="2.0">             
    </faces-config>

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

  • Issue with faces-config.xml file

    Hi,
    I'm working on a project which needs more no. of JSF Pages and JSF Navigations,
    But when i trying to creat pages more than 25 pages,the process becoming too slow,does this
    effects the Application performance?Can any one suggest me why it happens and what are the
    limitations for creating the JSF pages.
    Does their any alternative to solve this Issue,I'm thing to create more faces-config.xml files as the
    Jsf pages increases,does this solves?
    Please suggest me.
    Thank you,
    Bandaru,

    Hi Bandaru,
    Are you trying to use the visual diagram option of faces-config? Coz i encountered difficulties when using it with many pages (more than 40) and the faces-config.oxd_faces was no longer able to support the diagram. "Solution" was to use only the overview and the sources of the faces-config. I don't know exactly but my problems were caused by the faces-config.oxd_faces and i don't think it affects performances for the application.
    For information, that was on a Jdev 10.1.3.0.4
    Regards,
    Tif

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

  • Regarding faces-config.xml

    Hi,
    Am using JHeadStart for page generation. Am having 4 ApplicationDefinition.xml file like setup, loan, lease and loc. If i give run application generator to 1 by 1, then finally if i run the page of the 1st generated one, then the page is displayed but the menu it uses is different and also the faces-config.xml is overwritten, so i cant able to traverse in the pages which are created for the particular ApplicationDefinition.xml file which is generated before the previous one. So pls help me solving the issue so that i can have 4 AppDef.xml file and can run all the pages generated from those 4 files at any instance of time.

    You need to set different values for the service-level property "Main Faces Config" in each application definition, for example faces-config-setup.xml, faces-config-loan.xml, etc.
    Steven Davelaar,
    JHeadstart team.

Maybe you are looking for