What Happens When You Create a JSF XHTML Page

Getting Started with ADF Faces 2-19 param-namefacelets.SKIP_XML_INSTRUCTIONSparam-name param-valuetrueparam-value context-param context-param param-nameorg.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLERparam-name param-value org.apache.myfaces.trinidadinternal.facelets.TrinidadFaceletViewHandler param-value context-param context-param param-namefacelets.DEVELOPMENTparam-name param-valuetrueparam-value context-param context-param param-namefacelets.SKIP_COMMENTSparam-name param-valuetrueparam-value context-param context-param param-namefacelets.DECORATORSparam-name param-value oracle.adfinternal.view.faces.facelets.rich.AdfTagDecorator param-value context-param context-param param-namefacelets.RESOURCE_RESOLVERparam-name param-value oracle.adfinternal.view.faces.facelets.rich.AdfFaceletsResourceResolver param-value context-param filter filter-nametrinidadfilter-name filter-classorg.apache.myfaces.trinidad.webapp.TrinidadFilterfilter-class filter filter-mapping filter-nametrinidadfilter-name servlet-nameFaces Servletservlet-name dispatcherFORWARDdispatcher dispatcherREQUESTdispatcher filter-mapping servlet servlet-nameFaces Servletservlet-name servlet-classjavax.faces.webapp.FacesServletservlet-class load-on-startup1load-on-startup servlet servlet servlet-nameresourcesservlet-name servlet-class org.apache.myfaces.trinidad.webapp.ResourceServlet servlet-class servlet servlet servlet-nameBIGRAPHSERVLETservlet-name servlet-class oracle.adfinternal.view.faces.bi.renderkit.graph.GraphServlet servlet-class servlet servlet servlet-nameBIGAUGESERVLETservlet-name servlet-class oracle.adfinternal.view.faces.bi.renderkit.gauge.GaugeServlet 2-20 Web User Interface Developers Guide for Oracle Application Development Framework servlet-class servlet servlet servlet-nameMapProxyServletservlet-name servlet-class oracle.adfinternal.view.faces.bi.renderkit.geoMap.servlet.MapProxyServlet servlet-class servlet servlet servlet-nameGatewayServletservlet-name servlet-class oracle.adfinternal.view.faces.bi.renderkit.graph.FlashBridgeServlet servlet-class servlet servlet-mapping servlet-nameFaces Servletservlet-name url-patternfacesurl-pattern servlet-mapping servlet-mapping servlet-nameresourcesservlet-name url-patternadfurl-pattern servlet-mapping servlet-mapping servlet-nameresourcesservlet-name url-patternafrurl-pattern servlet-mapping servlet-mapping servlet-nameBIGRAPHSERVLETservlet-name url-patternservletGraphServleturl-pattern servlet-mapping servlet-mapping servlet-nameBIGAUGESERVLETservlet-name url-patternservletGaugeServleturl-pattern servlet-mapping servlet-mapping servlet-nameMapProxyServletservlet-name url-patternmapproxyurl-pattern servlet-mapping servlet-mapping servlet-nameresourcesservlet-name url-patternbiurl-pattern servlet-mapping servlet-mapping servlet-nameGatewayServletservlet-name url-patternflashbridgeurl-pattern servlet-mapping web-app An entry is also created in the faces-config.xml file for the view handler, as shown in Example 2–14 . Example 2–14 Generated faces-config.xml File for an XHTML Page ?xml version=1.0 encoding=UTF-8? faces-config version=1.2 xmlns=http:java.sun.comxmlnsjavaee application default-render-kit-idoracle.adf.richdefault-render-kit-id application faces-config Getting Started with ADF Faces 2-21 An entry in the trinidad-config.xml file defines the default skin used by the user interface UI components in the application, as shown in Example 2–15 . Example 2–15 Generated trinidad-config.xml File ?xml version=1.0 encoding=UTF-8? trinidad-config xmlns=http:myfaces.apache.orgtrinidadconfig skin-familyfusionskin-family trinidad-config When the page is first displayed in JDeveloper, it is displayed in the visual editor accessed by clicking the Design tab, which allows you to view the page in a WYSIWYG environment. You can also view the source for the page in the source editor by clicking the Source tab. The Structure window located in the lower left-hand corner of JDeveloper, provides a hierarchical view of the page.

2.4.6 How to Add ADF Faces Components to JSF Pages

Once you have created a page, you can use the Component Palette to drag and drop components onto the page. JDeveloper then declaratively adds the necessary page code and sets certain values for component attributes. To add ADF Faces components to a page: 1. In the Application Navigator, double click a JSF page to open it in the editor.

2. If the Component Palette is not displayed, from the menu choose View

Component Palette . By default, the Component Palette is displayed in the upper right-hand corner of JDeveloper.

3. In the Component Palette, use the dropdown menu to choose ADF Faces.

The components are contained in three accordion panels: Common Components, Layout , and Operations. Figure 2–8 shows the Component Palette displaying the Common Components for ADF Faces. Tip: For detailed procedures and information about adding and using specific ADF Faces components, see Part III, Using ADF Faces Components . Note: You cannot use ADF Faces components on the same page as MyFaces Trinidad components tr: tags or other AJAX-enabled library components. You can use Trinidad HTML tags trh: on the same page as ADF Faces components, however you may experience some browser layout issues. You should always attempt to use only ADF Faces components to achieve your layout. Note that your application may contain a mix of pages built using either ADF Faces or other components. 2-22 Web User Interface Developers Guide for Oracle Application Development Framework Figure 2–8 Component Palette in JDeveloper 4. Select the component you wish to use and drag it onto the page. JDeveloper redraws the page in the visual editor with the newly added component. In the visual editor, you can directly select components on the page and use the resulting context menu to add more components. Figure 2–9 shows a page in the visual editor.