Templating in JSF

Hello,
Can anybody suggest which templating framework can be used for JSF application being developed in Jdev for OAS 10.1.3?
We'd like to use a common template with headers, footers, etc for our pages. In our previouse projects we used jsp includes which is probably not the most effective way...Is there something like Tiles for JSF?
thank you

Hi,
Thans for the answer. The first and limited version of our project is supposed to go live in the middle of March. Also we are using OAS 10.1.3.1 to run the application, so we are planning to use JDev 10.1.3.1. We had some problems trying to use more recent JDev version do develop and deploy an JSF/ADF/EJB/Toplink application to an older version app server.
Will we be able to migrate to JDev 11 seamlessly and keep using OAS 10.1.3.1?
When is it planned to be released?
Also, I did not understand your last line about Facelets and ADF library. Is Facelets a better option in JDev 11? What is the templating framework that is going to be included into it?
thank you

Similar Messages

  • UIX Templates and JSF

    What is the templating mechanism in JSF. So far I can't find any native suport and have been advised to use Facelets.
    Does anyone have an opinion on this.
    Thanks
    Pat

    We also had the same problem.
    We used the panel page, for enclosing all our UI components. We removed all the menu, header, branding tags from the page.
    We thaen used a txt file having....
    <f:facet name="menu1">
    <af:menuTabs>
    <af:commandMenuItem text="Cases"
    action="#{backing_view_dockets_docketsEdit.onCasesMenuClick}"
    immediate="true"/>
    <af:commandMenuItem text="Parties" immediate="true"
    action="#{backing_view_parties_partiesEdit.onPartiesMenuClick}"/>
    <af:commandMenuItem text="General Documents" immediate="true"
    action="#{backing_view_genDocs_genDocsEdit.onGDMenuClick}"/>
    <af:commandMenuItem text="RTS Events"/>
    <af:commandMenuItem text="Global Search" onclick="globalSearch()"/>
    <af:commandMenuItem text="Content Browse" onclick="htree()"/>
    <af:commandMenuItem text="Log Out" action="logout"/>
    </af:menuTabs>
    </f:facet>
    <f:facet name="menuGlobal"/>
    <f:facet name="branding">
    <af:objectImage height="62" width="456" source="../../images/atmos_logo_wb.gif"/>
    </f:facet>
    <f:facet name="brandingApp"/>
    <f:facet name="appCopyright"/>
    <f:facet name="appPrivacy"/>
    <f:facet name="appAbout"/>
    Then we included this file in the jspx file....
    <jsp:directive.include file="/view/commons/template.txt"/>
    Thanks
    -Gana

  • How to consume JSF template in JSF page?

    Honestly - I have read about templates in Web User Interface Developers Guide for Oracle ADF, and I am doing the simple steps - I create the page template e.g. AppTemplate.jspx and it is based on 3-column quick layout - I can select any facet in this template page and then edit. But then I am trying create page Dashboard.jspx, that is based on AppTemplate.jspx. Well - no facets from AppTemplate.jspx is available in Dashboard.jspx - I can do anything around the 3-column box in Dashboard.jspx but nothing inside it. So - I had intention to use AppTemplate as base template for my application but I am starting to feel, that my current solution is trying to create template page (AppTemplate), tad already uses another template (quick start layout) and so - the faces of quick start layout cann't be available in Dasboard.jspx page... My intent was to palce controls on the facets of any of the 3 columns directly in Dashboard.jspx page but currently I cann't achieve this...
    Well, after my unsuccessfule efforts now I am strating to think, that - it is the intent of ADF, that I should copy my favourite quick start layout jspx page, add to my project and rename it and use it as my base app template?... This can be true, but - there are 2 strange issues: 1) why Oracle provides the possibility to choose quick start layout for template file at all and there are no sound warnings in documentation against the use of quick start layouts for templates; 2) usual OO approach is to derive from the base class and not to copy and modify this base class.
    Edited by: user454720 on 2010.4.1 12:38
    Edited by: user454720 on 2010.4.1 12:39

    Hi,
    the closest to what you want to achive is to build a base page template and a set of declarative components for the area layouts. There is a (not so well documented feature) of dynamic declarative components (information of how to use it is provided in the component tag documentation) that allows you to build page fragments within a project and define them as a declarative component. The declarative component can have facetRef elements for the developer to add components. The nice thing to say about dynamic declarative components, compared to "normal" declarative components is that their content is flattened and added to the page hierarchy, which means they also participate in the layout geometry management of the surrounding parent component.
    Because dynamic declarative components are based on page fragments, you can leverage the quick layouts mentioned by Shay
    Frank

  • JSF - Why getting wrong path Handling URLs in Facelets Templates

    Hi, I am trying to do a web application using JSF, Facelets in Netbeans 6.7. but I am having a problem:
    Why I am getting wrong path ?
    It is very simple, straight forward web application.
    When run, it shows the template-client.xhtml perfectly . The navigation menu is shows ok, but they don't work. However, if I enter in the browser address http://localhost:8080/test3/portal/products.jsf it goes perfect to the right page and the navigation between About, Products and Home works perfect. But once I click on Home, the menu start to give me errors. Looks like the path is wrong again.
    folders structure:
    test3My code:
    faces-config.xml:
    <?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">
        <application>
            <view-handler>
                com.sun.facelets.FaceletViewHandler
            </view-handler>   
        </application>
    </faces-config>web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" 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">
        <context-param>
            <param-name>com.sun.faces.verifyObjects</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>com.sun.faces.validateXml</param-name>
            <param-value>true</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
            <param-value>.xhtml</param-value>
        </context-param>
        <context-param>
            <param-name>facelets.DEVELOPMENT</param-name>
            <param-value>false</param-value>
        </context-param>
        <context-param>
            <param-name>facelets.SKIP_COMMENTS</param-name>
            <param-value>true</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>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>forward.jsp</welcome-file>
            </welcome-file-list>
        </web-app>forward.jsp:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <jsp:forward page="template-client.jsf"/>template-client.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!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:h="http://java.sun.com/jsf/html">
        <body>
            This text above will not be displayed.
            <ui:composition template="/template.xhtml">
                This text will not be displayed.
                <ui:define name="title">
                    Facelets
                </ui:define>
                This text will also not be displayed.
                <ui:define name="body">
                    Hello from the Facelets client template!
                </ui:define>
                This text will not be displayed.
            </ui:composition>
            This text below will also not be displayed.
        </body>
    </html>template.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!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:ice="http://www.icesoft.com/icefaces/component">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <title>Facelets - Template Example</title>
            <link href="#{facesContext.externalContext.requestContextPath}/css/default.css" rel="stylesheet" type="text/css" />
        </head>
        <body>
            <div id="menu">
                <ui:insert name="linemenu">
                    <ul>
                        <li><a href="../forward.jsp">Home</a></li>
                        <li><a href="about.jsf">About Us</a></li>
                        <li><a href="products.jsf">Products</a></li>
                    </ul>
                </ui:insert>
            </div>
            <div>
            <h1>
                <ui:insert name="title">Default Title</ui:insert>
            </h1>
            <p>
                <ui:insert name="body">Default Body</ui:insert>
            </p>
            </div>
        </body>
    </html>about.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!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">
        <body>
            <ui:composition template="./../template.xhtml">
                <ui:define name="title">
                    title ABOUT
                </ui:define>
                <ui:define name="body">
                    body ABOUT
                </ui:define>
            </ui:composition>
        </body>
    </html>products.xhtml:
    <?xml version='1.0' encoding='UTF-8' ?>
    <!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">
        <body>
            <ui:composition template="./../template.xhtml">
                <ui:define name="title">
                    title PRODUCTS
                </ui:define>
                <ui:define name="body">
                    body PRODUCTS
                </ui:define>
            </ui:composition>
        </body>
    </html>

    My folders:
    Test3
         Web Pages
              /WEB-INF
              /css
                  -default.css
              /layouts
              /portal
                  -about.xhtml
                  -products.xhtml
              -forward.jsp
              -template.xhtml
              -template-client.xhtmlPlease, I need help with this. It may is very easy to find out, I maybe skiping something
    Thank for your help anyone!!!

  • Navigation issue using jsf, tiles, tomahawk  :loosing faces context

    Hi all,
    I enhanced my webapp using tomahawks jscookmenu.
    Triggering 1 menuItem the wanted pages displays correctly but the next click anywhere in the application shows this error:
    org.apache.jasper.JasperException: javax.faces.FacesException: Faces context not found. getResponseWriter will fail. Check if the FacesServlet has been initialized at all in your web.xml configuration fileand if you are accessing your jsf-pages through the correct mapping. E.g.: if your FacesServlet is mapped to  *.jsf (with the <servlet-mapping>-element), you need to access your pages as 'sample.jsf'. If you tried to access 'sample.jsp', you'd get this error-message.The web config is like that:
    <?xml version="1.0"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
         version="2.4">
         <context-param>
              <description>Tiles MyFaces Config</description>
              <param-name>tiles-definitions</param-name>
              <param-value>/WEB-INF/tiles.xml</param-value>
         </context-param>
         <context-param> 
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name> 
              <param-value>.jsp</param-value>
         </context-param>
         <context-param>
              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
              <param-value>server</param-value>
         </context-param>
         <context-param>
              <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
              <param-value>off</param-value>
         </context-param>
         <!-- context-params mafaces -->
         <context-param>
              <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.RENDER_VIEWSTATE_ID</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.STRICT_XHTML_LINKS</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.CONFIG_REFRESH_PERIOD</param-name>
              <param-value>this is a bug in myfaces</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
              <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
              <param-value>/faces/myFacesExtensionResource</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
              <param-value>true</param-value>
         </context-param>
         <context-param>
              <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
              <param-value>false</param-value>
         </context-param>
         <!-- StartupServletContextListener -->
         <listener>
              <listener-class>
                   org.apache.myfaces.webapp.StartupServletContextListener
              </listener-class>
         </listener>
         <!-- Faces MyFacesExtensionsFilter -->
         <filter>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <filter-class>
                   org.apache.myfaces.webapp.filter.ExtensionsFilter
              </filter-class>
              <init-param>
                   <param-name>uploadMaxFileSize</param-name>
                   <param-value>1m</param-value>
              </init-param>
         </filter>
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>/faces/*</url-pattern>
         </filter-mapping>
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>*.jsf</url-pattern>
         </filter-mapping>
         <!-- Faces Servlet -->
         <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <!-- Faces Servlet Mapping -->
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.jsf</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
         </welcome-file-list>
         <servlet>
              <servlet-name>imageServlet</servlet-name>
              <servlet-class>my.com.xplorer.gui.v.ImageServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>imageServlet</servlet-name>
              <url-pattern>/image/*</url-pattern>
         </servlet-mapping>
    </web-app>So I lost the faces context using the jscookmenu, I believe.
    My webapp uses tiles, and there is 2 navigation possibilities: tomahawaks jscookmenu and tomahawaks commandNavigation.
    Latter one runs ok, I do use
    <t:panelNavigation id="nav" styleClass="navigation"
         itemClass="navitem" separatorClass="navseparator" 
         activeItemClass="navitem_active" openItemClass="navitem_open">
         <t:commandNavigation action="#{newsHandler.userRequest}" value="#{newsHandler.rss_source_name[0]}">
              <f:param name="navigator"  value="/jsf/news.jsp" />
         </t:commandNavigation>
    </t:panelNavigation>for this kind of navigation I do not use any navigation rules in faces config. To dynamically include the desired faces page I do that:
    <%
         String s = (String)request.getParameter("navigator");
         if (s == null || s.length() == 0 ) {
              s =  "/jsf/explorer.jsp";
    %>
    <jsp:include page="<%=s %>" />That does work.
    Now like I said I did enhance the app by adding tomahawks jscookmenu.
    Therefore I use the following in another tile:
    <t:jscookMenu layout="hbr" theme="ThemeOffice" styleLocation="resources/css">
              <%/* Availaible jscookMenu themes: ThemeIE, ThemeMiniBlack, ThemeOffice, ThemePanel
                 Availaible jscookMenu layout: hbr, hbl, hur, hul, vbr, vbl, vur, vul
                 respect to Heng Yuan http://www.cs.ucla.edu/~heng/JSCookMenu
            */%>
      <t:navigationMenuItem id="nav_0" itemLabel="#{localz.Xplorer}" action="Xplorer" />
    </t:jscookMenu>For this kind of navigation I tried to use navigation rules and the following show the config:
         <navigation-rule>
           <from-view-id>/jsf/*</from-view-id>
            <navigation-case>
                <from-outcome>Xplorer</from-outcome>
                <to-view-id>/jsf/tileMain.jsp?navigator=/jsf/explorer.jsp</to-view-id>
            </navigation-case>
            <navigation-case>
                <from-outcome>Tabs</from-outcome>
                <to-view-id>/jsf/tileMain.jsp?navigator=/jsf/tab.jsp</to-view-id>
            </navigation-case>
         </navigation-rule>That works for the first click. The desired page is shown. The nect click anywhere in the app then show the mentioned error.
    Using tiles I use this view-handler
    <view-handler>org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl</view-handler>One question is: can I use another view-handler on top of the above one? So I could extend com.sun.facelets.FaceletViewHandler and try my luck with this? Or is the solution pointed out just a millisecond from being ok, I just don�t see it?
    Maybe you need to know a bit more on how I use tiles:
    That is the page I start with. It inserts the tile shown underneath.
    <f:view locale="#{userLocale}">
         <f:loadBundle var="localz" basename="my.com.xplorer.gui.v.Lokalization" />
         <f:loadBundle var="bundle" basename="my.com.xplorer.gui.v.messages" />
         <f:subview id="tileMain">
              <h:form id="myJsfForm" styleClass="standard">
                        <tiles:insert definition="template" flush="false" />
              </h:form>
         </f:subview>
         <h:messages />
    </f:view>
    </html>The foolowing is the tile structure.
    The bodi tile is the dynamic part. Above you see that I dynamically load the pages into it.
    <t:htmlTag value="div" styleClass="pageLayout">
         <h:panelGrid columns="2" align="center" styleClass="pageContent">
              <f:facet name="header">
                   <f:subview id="header">
                        <tiles:insert attribute="header" flush="false" />
                   </f:subview>
              </f:facet>
              <t:htmlTag value="div" styleClass="pageMenu">
                   <f:subview id="menu">
                        <tiles:insert attribute="menu" flush="false" />
                   </f:subview>
              </t:htmlTag>
              <t:htmlTag value="div" styleClass="pageContentWoMenu">
                   <f:subview id="bodi">
                        <tiles:insert attribute="bodi" flush="false" />
                   </f:subview>
              </t:htmlTag>
              <f:facet name="footer">
                   <f:subview id="footer">
                        <tiles:insert attribute="footer" flush="false" />
                   </f:subview>
              </f:facet>
         </h:panelGrid>
    </t:htmlTag>Maybe you also need to know the tiles config?
    <tiles-definitions>
       <definition name="template" path="/jsf/tileTemplate.jsp">
              <put name="header"  value="/jsf/header.jsp"/>
          <put name="menu"    value="/jsf/menu.jsp"/>
          <put name="bodi"    value="/jsf/bodi.jsp"/>
          <put name="footer"    value="/jsf/footer.jsp"/>
       </definition>
       <definition name="/jsf/news.tiles" extends="template">
              <put name="bodi"  value="/jsf/news.jsp"/>
       </definition>
       <definition name="/jsf/explorer.tiles" extends="template">
              <put name="bodi"  value="/jsf/explorer.jsp"/>
       </definition>
       <definition name="/jsf/tab.tiles" extends="template">
              <put name="bodi"  value="/jsf/tab.jsp"/>
       </definition>If you have read until here: thanks very much.
    There seems to be a sort of gap regarding jsf navigation documentation.
    I mean the ordinary way is covered everywhere (the book I have covers that too), but jscookmenu seems not to fit in too good. I also tried it with an actionslistener in the jscookmenu but that failed, too. So a link to documents telling the truth on jsf navigation I would appreciate very much.
    Kind regards
    Belle Ile En Mer

    This is the error i am getting into now..
    exception
    org.apache.jasper.JasperException: An exception occurred processing JSP page /welcomeJSF.jsp at line 19
    16: This file is an entry point for JavaServer Faces application.
    17: --%>
    18: <body>
    19: <f:view>
    20: <h3><h:outputText value="CHOULTRY'S IN BANGALORE" /></h3>
    21: <h:form>
    22: <table border="0">
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    root cause
    java.lang.RuntimeException: Cannot find FacesContext
         javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1811)
         javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1628)
         org.apache.jsp.welcomeJSF_jsp._jspx_meth_f_005fview_005f0(welcomeJSF_jsp.java:112)
         org.apache.jsp.welcomeJSF_jsp._jspService(welcomeJSF_jsp.java:86)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

  • JSF 1.2 + Shale Tiles Example needed

    Hello,
    I'm trying to develop application by using jsf 1.2 and Shale tiles. I have a problem with configuration. I was working before with Struts Tiles and MyFaces but it isn't the same.
    Can somebody provide my some exanle simle aplication of using Shale Tiles and JSF 1.2?
    Thx.

    To make templates in JSF we use Facelets here. I think Tiles = Strus , Facelets = JSF.
    Cya.

  • Setting properties with parameter values in templates

    I'm using templates with JSF. I'd also like to acquire the value of a request parameter and pass it to a setter method in a ManagedBean so that I can derive the page body from it. My simplified template looks like this :
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:utils="http://java.sun.com/jsf/composite/utils" xmlns:f="http://java.sun.com/jsf/core">
    <!-- General Meta -->
    <f:metadata>
         <f:viewParam name="myparameter" value="#{myBean.someProperty}" />
    </f:metadata>
    <h:head>
              <title>No title here.</title>
    </h:head>
    <h:body>
         <div id="page">
              <div id="main">
                    <ui:insert name="body" />
              </div>
              <utils:navigation />
         </div>
    </h:body>
    </html>The "body", created with ui:composition, is using "myBean". But it doesn't matter because the "set" method isn't being called on the bean. Where should I put "f:viewParam" code
    to set the property of a ManagedBean if I'm using templates?
    Thank you in advance for any help.

    Problem solved.
    Found the solution to my general problem by making use of the Annotation "ManagedProperty". It only applies to request scope apparently but that is the scope where I need it.
    I found these two pages helpful.
    http://stackoverflow.com/questions/4888942/viewparam-vs-managedpropertyvalue-param-id
    http://download.oracle.com/javaee/6/api/javax/faces/bean/ManagedProperty.html

  • Where do I put the Jakarta files standard.jar and jstl.jar when developing with JSF 2.0 in OEPE using web logic server

    hi everybody, I am wondering what should i do with the standard.jar and jstl.jar files when using we logic. I tried putting both files into
    the directory c:\oracle\middleware\oracle_home\user_projects\domains\base_domain\bin.  I don't know if this is correct.  Thanks in
    in advance for the help.

    Anyways I found this link on www.oracle.com website by the same author of the book I am reading Deepak Vohra - Templating with JSF 2.0 Facelets.
    although here he is using Weblogic 11g although I don't think it makes a difference.  have a look at the Setting up the Environment section
    where he says to download the jstl.jar and standard.jar files.
    http://www.oracle.com/technetwork/articles/java/facelets-454361.html

  • How to Refresh a Page once saved to database in ADF.

    Hi,
    I created a JSF page using project template as "JSF,ADF,business components".
    There is a List of values displayed in a dropdown list,
    User can create new value and once it is saved to the database it should reflect in the list of values.But it is not displaying in the LOV and it is happening only when i close that page and open a new one.
    Can u please tell me how to refresh a page without closing the current page once save button is clicked.
    Thank you,
    Harika.

    Mini wrote:
    Hi Hari,
    Yes i have a apex page redirects from the ebs menu like you said. But for the refresh issue instead of modifying in the jsp i thought of bringing the automatic refresh for that apex page once it is loaded within apex.
    However these type of issues are sometimes get fixed by clearing browser cache or just by restarting your browser. Have you tried it?Yes i have tried, by clearing the browser cache and also by restarting the browser then too it still persist.
    Any DA action will be helpful for refreshing that page for 1sec once it is loaded. Since i dont want it to be loaded multiple times often once it is loaded.
    The refresh has to be only once if the page is loaded.
    or is it possible to Refresh the page based on the application page item through DA
    Thanks
    Brgds,
    MiniTechnically Yes, you can create a D.A. that will fire only once based on some apex page item or application item value. However this is NOT the correct solution.
    <li> When you see apex page (after clicking menu in EBS), do you see apex url in browser address bar? Can you post the URL here?
    <li> If you directly log-in to APEX (not via EBS), do you still face this issue?
    Regards,
    Hari

  • ER's for Facelet Support, or "why facelets is a 2nd class citizen in JDev"

    Hello all,
    After an [url http://forums.oracle.com/forums/thread.jspa?threadID=873997]interesting journey getting Facelets, Trinidad, and JDeveloper 11g to play nicely together, I thought I'd post some thoughts on the sort of things that (IMHO) JDeveloper 11 needs in order to offer real, true Facelets support. I'll offer my list below, which will include observations as well as suggestions:
    1). If we are going to use true .xhtml files, JDeveloper 11g doesn't support drag-and-drop from the data control pallette on to the .xhtml page (I do have a workaround that I'll detail below, but that has its own issues).
    2). It's literally impossible to mix JSP and Facelets in a single project. As soon as you configure your project for JSP (by adding taglibs, for instance), you can no longer create a Facelets page from the "New" gallery, as JDeveloper will tell you "Cannot add a facelets page to a project configured for JSP." It works both ways, too - if you add a Facelets file to your project, no longer can you create a JSP.
    3). Even if I manually try to get data bindings (page definitions) working with .xhtml files, it doesn't seem to work (I did this by creating a jspx file and page definition and copying files / changing the data binding registry).
    4). Because ADF Faces is so intertwined with Trinidad, it would be nice if faces-config.xml and web.xml would be properly configured automatically (as an option) for Trinidad. If I manually configure faces-config.xml by ensuring the view handler is not defined there, define an alternate view handler in web.xml, and then add a new Facelets page to my project, JDeveloper undoes all my work and puts the view handler back in faces-config.xml, causing major problems.
    5). To work-around the poor support for drag-and-drop from data controls onto .xhtml files, I have just decided to use .jspx as my default suffix for Facelets files. I create them via picking "JSF Page" from the new gallery, and then I manually mess around with the source so that it's not really a JSPX anymore. However, if I do this, I don't have any tag completion support for the Facelets tags. If I download the TLD from [url https://facelets.dev.java.net/servlets/ProjectDocumentList?folderID=4190&expandFolder=4190&folderID=0]here, JDeveloper complains about not having a tag handler class.
    6). Two words: WYSIWYG Editing. There isn't any for Facelets pages. I have ADF Template envy. As soon as you configure web.xml and faces-config.xml for Facelets, all WYSIWYG is broken. Now, I know "real" coders don't use WYSIWYG, but it's sure darn nice to switch from source view and take a quick peek at the layout. For new-to-JSF/new-to-Trinidad/new-to-ADF Faces developers, it's almost a hard-and-fast necessity.
    7). Would be nice to have page definition inheritance working like for ADF Templates too.
    8). Drag-and-dropped things from the data control tend to include f:validator tags. No problems there, but the tags don't include an validatorId. Facelets needs them. I work around this manually by adding validatorId="" to each of the tags. I know there is a velocity template somewhere that JDeveloper uses for this drag-and-drop, but I cannot find them - does anyone know where they are?
    9). If, in a project with no ADF Faces - only Trinidad, if I drag-and-drop from the data control on to an ui:define tag in the structure window, I get all kinds of ADF Faces options for the drop, nothing for trinidad.
    10). Facelets < 1.1.15 has a tiny bug with the ui:debug tag (you cannot expand the component tree). It would be nice to update the one included with JDev (1.1.12) - I have done this and it appears to work fine.
    From a productivity point of view - #6, together with drag-and-drop support on to true .xhtml files (not .xhtml files with a .jspx extension) would elevate the game leaps-and-bounds.
    I'm interested in any of the following:
    a). Some wonderful news from Oracle that they already know all of these limitations and they are fixed in a patch release which was just uploaded to OTN 5 minutes ago ;)
    b). Insight on better ways of working with ADF BC / ADF Bindings / Trinidad / Facelets in JDeveloper 11
    c). Feedback and experiences from other people using Facelets in JDeveloper, particularly with ADF Data Binding.
    Depending upon the level of interest, perhaps we can migrate the discussion over to the [url http://groups.google.com/group/adf-methodology]ADF Enterprise Methodology group and produce a Wiki page out of it.
    Best regards,
    John

    Nice post John,
    Here are some of my comments on those issues:
    +1). If we are going to use true .xhtml files, JDeveloper 11g doesn't support drag-and-drop from the data control palette on to the .xhtml page (I do have a workaround that I'll detail below, but that has its own issues).+
    +3). Even if I manually try to get data bindings (page definitions) working with .xhtml files, it doesn't seem to work (I did this by creating a jspx file and page definition and copying files / changing the data binding registry).+
    I tried that a while back too because Facelets is so much more powerful than anything else to achieve high performance and powerful templating in JSF, but it's completely unsupported. I tried all possible combination of servlet-mapping aand servlet-filter-mapping. AFAIK there's no way to do it yet and Oracle will most likely delay the support of Facelets + Databindings until JSF 2.0 where there won't be much choice. If you got them working somehow in 11g, I would be very very interested in getting a small demo project.
    +2). It's literally impossible to mix JSP and Facelets in a single project. As soon as you configure your project for JSP (by adding taglibs, for instance), you can no longer create a Facelets page from the "New" gallery, as JDeveloper will tell you "Cannot add a facelets page to a project configured for JSP." It works both ways, too - if you add a Facelets file to your project, no longer can you create a JSP.+
    I can understand that one, I'm sure it comes from a a very good intention from Oracle as Facelets actually replace the JSP engine, meaning the pages don't get parsed by JSP, thus tag classes don't get called. So I assume that limitation was to prevent people from thinking that Facelets integrates with JSP while it's not at all. However, I can understand that some applications might want to leverage both technologies at the same time
    Regards,
    ~ Simon

  • Reference faces-config.xml file from java code.

    I would like to reference the navigation rules I have set up in my faces-config.xml file from inside my source code.
    For example:
    Navigation Rule:
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>pricingEngine</from-outcome>
    <to-view-id>/faces/template/t_pricing_engine.jsf</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    I would like do some sort of lookup by 'pricingEngine' and get '/faces/template/t_pricing_engine.jsf' back.
    Any ideas?

    I would like to reference the navigation rules I have set up in my faces-config.xml file from inside my source code.
    For example:
    Navigation Rule:
    <navigation-rule>
    <from-view-id>*</from-view-id>
    <navigation-case>
    <from-outcome>pricingEngine</from-outcome>
    <to-view-id>/faces/template/t_pricing_engine.jsf</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    I would like do some sort of lookup by 'pricingEngine' and get '/faces/template/t_pricing_engine.jsf' back.
    Any ideas?

  • Issue with Packaged Jars added to project from resource Palette

    Hello!
    I am using Jdeveloper 11.1.2.2.
    I started this post thinking there was an issue having to do with packaging jars that refer to other libraries (see post Are Libraries Required?
    Now I realize it is a different issue (although that other post is relevant).
    Issue: I create a package -- a template in this case.
    I deploy it in my file system and then load it into the resource palette as a file system connection.
    I create a new application. From the resource palette, I add the jar to the view controller project, and am able to use the template in jsf files. No problem. Runs fine.
    then I load the application into subversion or I move the whole application to another directory on my computer.
    When I open the moved application (or do a checkout from subversion), I open the jsf that contains a reference to the jar, the design view is completely blank. Going to the source, I see my original code, but there are red signals in the upper-right signifying an error.
    If I run the application without fixing it, I get an error saying the template cant be found, Also, when I deployed to a standalone weblogic server, I get the same error (see the post above for this error).
    I open the project properties. The ADF Library is in the "Libraries and Classpath" and pressing edit, I can see the correct reference to the path of the jar.
    To make the application work, I have to remove the ADF Library (or at least the reference when pressing edit) and then from the resource palette, add it again to the project.
    IS THIS NORMAL? Am I doing something wrong with the initial packaging of the jar? Should I change some setting somewhere?
    How am I supposed to deploy to weblogic?
    The other posting shows an error output if I try to run the application before fixing the jar reference. I got the same darn error when deploying to weblogic.
    Would appreciate any help!
    Stuart
    Edited by: Stuart Fleming on Nov 18, 2012 4:45 AM

    Timo,
    thank you for your reply. I actually created a youtube video on this, available here: http://youtu.be/ERyLngq9hlI
    Since the video might be a little tedious to view, Here are the details. You can jump to the exciting parts of the video, if you want:
    Here is what I did:
    1. I cleaned out my system directory and the temp directory on my computer.
    2. Opened the application containing my template. Deleted the existing jar file.
    3. Started taking video....
    4. (From 40 seconds into the video) Created the jar file again.
    5. (2:55 minuts into video) Closed template applcation and Created new fusion application.
    6. (4 minutes into the video) Created model
    7. (4:15 minutes into video) in view controller added template, created a jsf page.
    8. (5 minutes into the video) Created Security and users.
    9. (6:30 minutes into the video) Created a task flow, with jsff in it, with a form on the jsff. Assigned Security to objects.
    *10. (7 minutes into the video). Ran JSF successfully.*
    11. (7:40 minutes into the video). Closed application. Copied the entire application into two directories.
    12. (8 minutes into video) Opened the first copied video. You can see that the jsf page is not accessing the template. Reviewed the View Controller project Libraries and classpath. Removed the library, re-added the jar from the resource palette. Worked fine.
    13. (9:30 minutes into video). Opened the 2nd copy of the file I intend for subversion. Showed the jsf page and the error it displays when open (same as in first copied application).
    Load application into subversion.
    14. (10 minutes into video). Check out application
    15. (10:15 minutes into video). Open JSF file. The reference to the template jar file is reading properly.
    16. (11 minutes into video). Load the original working copy into subversion.
    17. (11:30 minutes into video). Check out from subverion, but the check out failed.
    18. (12 minutes into video). Check out, and look at the jsf.  The page shows fine.
    Timo, I think this might be reported as a bug. You ought to be able to move files around on your computer. Also, the first time I checked the application out from subversion, the jsf page did not read the template.
    ALSO, when I tried to deploy the application (that contained the reference to the template jar file to weblogic), I got the same error when I ran the jsf
    first lines of that error:
    Error 500--Internal Server Error
    java.io.FileNotFoundException: /WEB-INF/ssfTemplate/SSFTemplate.jsf Not Found in ExternalContext as a Resource
    at com.sun.faces.facelets.impl.DefaultFaceletFactory.resolveURL(DefaultFaceletFactory.java:224)
    Thank you for your time and commitment!
    Stuart
    Edited by: Stuart Fleming on Nov 18, 2012 10:13 AM

  • Unable to find PanelPage option in ADF Faces core...

    Hi,
    Am trying to come up with SRDemo application for 11g and am following the tutorial provided for 10g in the site. I am encountering various problems as I am working with 11g. One of the problems is that am not able to find "Panel Page" option under ADF Faces core or anywhere. I have included the ADF Faces components 11-ji3 lib. Secondly, I was unable to locate JSF JSP option in JSF Gallery and have went on to create a template using JSF Template dialogue. Any solution to this?

    Hi,
    the panelPage component is no longer around. Using a template to mimic this layout is the right approach to take.
    Frank

  • I need to konw in which jsff page the action is happen

    i am using jdeveloper 11.1.2
    I have this jsf page which contains 4 task flows
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:c="http://java.sun.com/jsp/jstl/core" locale="ar">
    <c:set var="viewcontrollerBundle" value="#{adfBundle['ta.view.ViewControllerBundle']}"/>
    <af:document title="composingSecretarySubmit.jsf" id="d1">
    <af:form id="f1">
    <af:pageTemplate viewId="/templates/PageTemplate.jsf" value="#{bindings.ptb1}" id="pt1">
    <f:facet name="title"><af:outputText value="#{viewcontrollerBundle.PAGETITLE_U4}" id="ot1"/></f:facet>
    <f:facet name="body">
    <af:panelTabbed id="pt2" inlineStyle="width:inherit;" dimensionsFrom="auto">
    <af:showDetailItem text="#{viewcontrollerBundle.SUBMIT_COMPOSING_PLAN_FROM_AUT}" id="sdi1">
    <af:region value="#{bindings.secretarySubmitTF2.regionModel}" id="r2"
    clientComponent="true"/>
    </af:showDetailItem>
    <af:showDetailItem text="#{viewcontrollerBundle.REQUORED_MODIFICATION_COMPOSIN}" id="sdi2">
    <af:region value="#{bindings.modifRequiredTF1.regionModel}" id="r3"/>
    </af:showDetailItem>
    <af:showDetailItem text="#{viewcontrollerBundle.READY_SUBMISSION_COMPOSING}" id="sdi3">
    <af:region value="#{bindings.readySubmissionCommitte1.regionModel}" id="r1"/>
    </af:showDetailItem>
    <af:showDetailItem text="#{viewcontrollerBundle.BEING_CHECKED_COMPOSING_PLAN}" id="sdi4">
    <af:region value="#{bindings.beingCheckedTF1.regionModel}" id="r4"/>
    </af:showDetailItem>
    </af:panelTabbed>
    </f:facet>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    If I make an action in any pages of these 4 task flow
    I need to know using java script or java in which task flow this action is happen

    I will try to explain more
    I have 4 bounded task flows
    I dragged them to one jsf page
    each task flow has 2 jsff pages
    and each jsff page has its unique help page
    in each jsff page i have button called "Show Help button"
    these buttons will open help page depending on the jsff that contains the clicked button
    so I need to know the id of the jsff page

  • Ignore required fileds when click on af:ShowDetilItem

    I am using jdeveloper 11.1.2
    I have jsf page with two showDetailItem
    in each one I have <af:region> which is task flow with jsff page contain required fields
    I need when click on showDetailItem to take me to this component without displaying error messages that I need to fill the required fields
    <af:form id="f1" usesUpload="true">
    <af:pageTemplate viewId="/templates/PageTemplate.jsf" id="pt1" value="#{bindings.ptb1}">
    <f:facet name="title">
    <af:outputText value="#{viewcontrollerBundle.PAGETITLE_U4}" id="ot1"/>
    </f:facet>
    <f:facet name="body">
    <af:group id="g1">
    <af:panelTabbed id="pt2" styleClass="AFStretchWidth" dimensionsFrom="auto">
    <af:showDetailItem text="#{viewcontrollerBundle.SAVED_SCI_PLAN}" id="sdi1" >
    <af:panelGroupLayout id="pgl1" layout="scroll">
    <af:region value="#{bindings.scientificWorkResearcherSubmitTF1.regionModel}"
    id="r1"/>
    </af:panelGroupLayout>
    </af:showDetailItem>
    <af:showDetailItem text="#{viewcontrollerBundle.SENDENG_SCI_PLAN_RESEARCH_CENTER}" id="sdi2">
    <af:region value="#{bindings.sentSciListTF1.regionModel}" id="r2"/>
    </af:showDetailItem>
    </af:panelTabbed>
    </af:group>
    </f:facet>
    </af:pageTemplate>
    </af:form>
    </af:document>
    </f:view>
    I tried to add attribute immediate = true and to define disclosureListener with FacesContext.getCurrentInstance().renderResponse(); but it didn't work

    I am sorry but I found this link after posting my question
    Validation in a paneltabbed
    sorry again

Maybe you are looking for

  • Error_Exception dump while opening the report in RRMX

    Hi All, When User trying to open the report Error_Exception dump is coming for few Info Providers. Please find attached dump for your reference.

  • Date format in Oracle 8i

    Is the 'TZD' option available for entering and displaying dates in Oracle 8.1.7.4? For example, I'm using sqlldr to load in a date in this format in my controlfile: Mon Jun 27 00:15:00 EDT 2005 DATETM          DATE 'DY MON DD HH24:MI:SS TZD YYYY', It

  • Configure SSL SQL Server 2012 Cluster Instance

    Hi, I am trying to configure a SSL Certificate on a named clustered instance but i can't This is the errorlog message 2014-12-11 14:28:51.49 spid10s Error: 17182, Severity: 16, State: 1. 2014-12-11 14:28:51.49 spid10s TDSSNIClient initialization fail

  • @XmlAttribute/@XmlValue need to reference a Java type that maps to text

    Hi, I get this exception when marshalling with xjc (either 2.0.1 or 2.1.3) generated classes. The xsd looks like this: <xs:complexType name="ExtensionType">      <xs:simpleContent>           <xs:extension base="xs:anySimpleType">                <xs:a

  • How can i change/create F1 doku text during runtime

    Hi everybody, I have a problem. During runtime the user should be able to create a documentation. This documentation must be stored in the F1 help of a data type. It's easy to get the created help text out of the F1 help. But is there any possibility