Archive

Archive for the ‘Oracle ADF’ Category

JSF 1.2 replacement for findComponent

December 7th, 2007

I have noticed that a lot of developers still migrating from JSF 1.1 to JSF 1.2 struggle to find a replacement for the findComponent method initially provided in JSF 1.1, which allowed developers to search for components by component id. Due to the complexity of modern JSF pages this method has sense been updated to require a query string as an input. To operate directly on a component based on its component id the invokeOnComponent method is required. The method below can be added to your current JSF utility class and used as a replacement for the now deprecated findComponent method.

For details on the shift away from the method for locating provided JSF 1.1 please refer to Jacob Hookom's insightful post on the subject.

JAVA:
  1. /**
  2.      *   Method for locating a component and invoking a ContextCallback to
  3.      *   perform some operation on that component. This method replaces the
  4.      *   findComponent method initially  made available in JSF 1.1, but has
  5.      *   since been depracted in JSF 1.2.
  6.      *   
  7.      *   Example: ContextCallback
  8.      *   ContextCallback executeCommandButtonAction = new ContextCallback() {
  9.      *      public void invokeContextCallback(FacesContext ctx, UIComponent c) {
  10.      *         // -- do something here...
  11.      *      }
  12.      *   };
  13.      */
  14.     public static void findComponent(String componentId, ContextCallback callback) throws FacesException {
  15.         // -- Get current instance of the Faces context object
  16.         FacesContext facesCtx = FacesContext.getCurrentInstance();
  17.         // -- Get view root for current view or page
  18.         UIViewRoot root = facesCtx.getViewRoot();
  19.         // -- Invoke the CallBack on the component associated with componentId
  20.         boolean found = root.invokeOnComponent(facesCtx, componentId, callback);
  21.         // -- Throw exception if the target component is not found
  22.         if (!found) throw new FacesException(componentId + " not found!");   
  23.     }

ADF Faces, ADF Faces Rich Client, JSF

ADF Faces RC: Execute an action or force navigation in a containing region from a nested region (Part 2)

December 6th, 2007

As a follow to my previous post, here is an example demonstrating how to invoke navigation in a region from a nested region with contextual events. For those unfamiliar with this feature of the controller facility in ADF 11g, contextual events provide a way to raise events from method bindings, which can be used to pass information between regions and, subsequently taskflows. In this specific case, we use contextual events to raise an event from a nested region that is handled by an event listener declared in the parent taskflow, which is responsible for invoking navigation in the parent region.

Download Example

ADF Faces Rich Client, Examples, Oracle ADF

ADF Faces RC: Execute an action or force navigation in a containing region from a nested region

December 6th, 2007

Taskflows and regions in ADF provide a mechanism to encapsulate a set of navigation cases between pages and transactions as well as supporting managed beans that contain domain specific functions or logic. Ultimately, the encapsulation of these powerful features provides us with a facility for reusing and sharing segments of an ADF Fusion application. However, there are some occasions where encapsulation becomes a bit cumbersome, creating a need to break the well-regarded practice of encapsulation. The need to force navigation in a containing region from a nested reason is one such case. Let's further detail this example. We will begin with a bounded taskflow (as depicted below) that contains a default view activity named Parent, a second arbitrary view activity --in this case FinishLine--, and a navigation case to link the two views.

parent-task-flow.xml

In this specific flow, which we will call parent-task-flow, the Parent view activity contains a region that displays a taskflow, named child-task-flow, which contains a single view activity, labeled Child, definition that simply renders an <af:commandButton>. The button rendered by the Child view activity in the nested flow is used to queue an ActionEvent on a button hidden in the Parent view activity defined in the parent-task-flow. By queuing the event on the hidden button in the Parent view activity, the nested taskflow forces the invocation of an Action, which in our case exercises the navigation case "next" defined in parent-task-flow, and results in the navigation from the Parent view activity to the FinishLine view activity in the parent-task-flow.

child-task-flow.xml


From an end-user's perspective, the perceived interaction after clicking the button within the nested taskflow to invoke an action in the parent or containing region will appear to be a simple navigation from the Parent view activity to the FinishLine view activity. The image below illustrates how the example is rendered and demonstrates the flow from the Parent to the FinshLine view activities after the button labeled "Click to Refresh Parent" is selected. Borders have been added to the sample to better depict the boundaries of the regions that render the child-task-flow and the parent-task-flows.


Now that we understand our intended outcome, let's take a look at how we queue an action from a nested taskflow on a button hidden in the containing or parent page. For simplicity, the figure below shows the hidden the hidden button in the Parent view activity. Thus, the button labeled "Click to Refresh Parent" will queue an action and, ultimately, invoke the action declared on the button labeled "Button Executed By Child".

The key to achieving this interaction is a mechanism to pass the component id of the "Button Executed By Child" as a String to the child-task-flow so that the "Click to Refresh Parent" button can use the identifier to locate the button in the containing region and, subsequently, queue an event. To pass the component id we must define an input-parameter-definition on the child-task-flow, which will store the id on the local pageFlowScope with the key "CommandButtonToExecute" and add a parameter to the parameter-map of the executable in the pageDef that defines an instance of the child-task-flow, which in our case is called "childtaskflow1".

From child-task-flow.xml

XML:
  1. <input-parameter-definition>
  2.       <name>commandButtonId</name>
  3.       <value>#{pageFlowScope.CommandButtonToExecute}</value>   
  4.     </input-parameter-definition>

From force_navigation_in_parent_region_parentPageDef.xml

XML:
  1. <taskFlow id="childtaskflow1"
  2.               taskFlowId="/force_navigation_in_parent_region/task_flows/child-task-flow.xml#child-task-flow"
  3.               xmlns="http://xmlns.oracle.com/adf/controller/binding">
  4.       <parameters>
  5.         <parameter option="required" evaluate="eachUse" id="commandButtonId" value="#{'parenttaskflow1:buttonToExecute'}"
  6.                    xmlns="http://xmlns.oracle.com/adfm/uimodel"/>
  7.       </parameters>
  8.     </taskFlow>

Next, we need to define an ActionListener on the "Click to Refresh Parent" button that will extract the component id from the pageFlowScope, locate the "Button Executed By Child" in the parent region, and queue an ActionEvent. The code used to define the ActionListener is listed below and is declared in a managed bean in the child-task-flow with a scope of request. The comments provided in the code snippet provide a detailed description of each line of code.

JAVA:
  1. public void executeAcitonOnCommandButton(ActionEvent evt){
  2.         // -- Get the current instance of the AdfFaces context object
  3.         AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
  4.         // -- Get the id of the button to execute from the PageFlowScope
  5.         String commandButtonId = (String)adfFacesCtx.getPageFlowScope().get("CommandButtonToExecute");
  6.         // -- Create a callback to execute on the target button or component
  7.         ContextCallback executeCommandButtonAction = new ContextCallback() {
  8.            public void invokeContextCallback(FacesContext ctx, UIComponent c) {
  9.               // -- Cast the component to an RichCommandButton
  10.               RichCommandButton buttonToExecute = (RichCommandButton)c;
  11.               // -- Create a new action to add to the components event queue
  12.               ActionEvent actionEvt = new ActionEvent(buttonToExecute);
  13.               // -- Queue the event
  14.               buttonToExecute.queueEvent(actionEvt);
  15.            }
  16.         };
  17.         // -- Get current instance of the Faces context object
  18.         FacesContext facesCtx = FacesContext.getCurrentInstance();
  19.         // -- Get view root for current view or page
  20.         UIViewRoot root = facesCtx.getViewRoot();
  21.         // -- Invoke the executeCommandButtonAction CallBack
  22.         boolean found = root.invokeOnComponent(facesCtx, commandButtonId, executeCommandButtonAction);
  23.         // -- Throw exception if the target component is not found
  24.         if (!found) throw new FacesException(commandButtonId + " not found!");
  25.     }

Conclusion

Though the interactions in this example are bit complex to describe the code required to achieve this use-case is relatively simple, and negates the need to leverage more complex features like contextual events, which could be used as a secondary approach.

Download Example

ADF Faces Rich Client, Examples, Uncategorized

ADF Faces RC: Scroll to a component in a PanelGroupLayout

November 8th, 2007

Here is a simple example that demonstrates the use of JavaScript to focus on a specific component within a page. In this particular example a PanelGroupLayout with its layout attribute set to "scroll" is used. The PanelGroupLayout makes it possible to scroll components outside of the current view port into view. To execute the focus functions two command buttons are provided. Enoy!

XML:
  1. <?xml version='1.0' encoding='windows-1252'?>
  2. <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
  3.           xmlns:h="http://java.sun.com/jsf/html"
  4.           xmlns:f="http://java.sun.com/jsf/core"
  5.           xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  6.   <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  7.   <f:view>
  8.     <af:document>
  9.       <af:form>       
  10.         <af:commandButton text="FocusOnMiddle" partialSubmit="true">
  11.             <af:clientAttribute name="focusComp" value="middleInput"/>
  12.             <af:clientListener method="focusEvent" type="action"/>
  13.         </af:commandButton>
  14.         <af:commandButton text="FocusOnLast" partialSubmit="true">
  15.             <af:clientAttribute name="focusComp" value="lastInput"/>
  16.             <af:clientListener method="focusEvent" type="action"/>
  17.         </af:commandButton>       
  18.         <af:panelGroupLayout id="panel" layout="scroll" inlineStyle="height:300px">
  19.             <af:forEach begin="0" end="100" var="row" varStatus="varStat">
  20.                 <af:inputText  value="#{varStat.index}"/>
  21.             </af:forEach>
  22.             <af:inputText clientComponent="true"  id="middleInput" value="focusHere1"/>
  23.             <af:forEach begin="0" end="100" var="row" varStatus="varStat">
  24.                 <af:inputText  value="#{varStat.index}"/>
  25.             </af:forEach>
  26.             <af:inputText clientComponent="true"  id="lastInput" value="focusHere2"/>
  27.         </af:panelGroupLayout>
  28.       </af:form>
  29.       <f:facet name="metaContainer">
  30.          <script>
  31.             <![CDATA[
  32.               function focusEvent(event){
  33.                var compid = event.getSource().getProperty('focusComp');
  34.                var comp = AdfPage.PAGE.findComponent(compid);
  35.                comp.focus();
  36.               }
  37.             ]]>
  38.         </script>
  39.       </f:facet>
  40.     </af:document>
  41.   </f:view>
  42. </jsp:root>

ADF Faces Rich Client, Examples, Oracle ADF

ADF Faces RC (RCF) @AJAXWorld West

August 6th, 2007

An even better reason to attend AJAXWorld West this fall: a sneak peak at some of the architectural nuances of ADF Faces RC/(Apache MyFaces RCF). I will be giving a talk on the subject and hope that you will join me. Details follow below. See you there!

AJAXWorld Conference & Expo 2007 West, which will take place September 23-26, at the Santa Clara Convention Center, in Santa Clara, California, will present a session by Oracle's Ric Smith entitled: "How to Architect a Rich Client Framework Beyond AJAX & JavaServer Faces."

The power of attraction need not only apply to the laws of physics and the occasional odd couple. The rich internet application community’s own polar forces (i.e. client- and server-side logic) have their own perfect complement, namely AJAX and JSF. More than just a method of abstraction, the combination of JSF and AJAX can be used to erect a high-performance rich client framework and in this talk we will dissect many of the architectural nuances of the symbiotic relationship between JSF and AJAX. The recently announced Apache MyFaces Rich Client Framework (RCF) will be used as a case study in this discussion as we delve into the complexities of client- and server-side component representation, rendering, event handling, and property management.

For more information.

ADF Faces Rich Client, AjaxWorld, Events, RCF

ADF Faces RC: Client-side Component Representation

July 6th, 2007

For those who have download the JDeveloper 11 preview and taken a whack at developing a web application with the new ADF Faces Rich Client Framework (RCF), you are probably starting to realize that their is a lot more going on in this framework than just a little bit of AJAX sprinkled on some server-side component. On the contrary, there is a complete JavaScript API that complements much of the API offered by server-side components contained in the framework. This word "complete" is a little misleading in that it causes one to infer that each server-side component has some client equivalent. There is some validity to this belief, however in an effort to deliver the best performance possible a JavaScript representations of components is sparingly delivered to the browser. You find more details on this subject in article published in the July edition of AJAXWorld Magazine, but for now just keep in mind that too much JavaScript execution on the client can degrade performance. Yes, it is true that there is "Too much of a good thing", even in the context of AJAX. That said RCF only generates a client-side object if:

  1. The developer declares a client-side listener (i.e. there is an application dependency).
  2. The clientComponent attribute on a component is set to "true".
  3. The component requires some client-side logic or rendering (e.g. table, tree, tree table, panel splitters, tabbed panels).

Just three simple cases. Keep this in mind as you plow through the ADF Faces RC JavaScrit APIs. Enjoy!

ADF Faces Rich Client, RCF

Release of Apache MyFaces Trinidad 1.2.1

July 5th, 2007

Trinidad 1.2.1 introduces a JSF 1.2 compatible JSF component set to the open source community. This is a welcome update at is it finalizes the much need JSF 1.2 support that many sought in the initial release of ADF Faces. The 1.2.x releases identify any Trinidad release that supports JSF 1.2. You can download the libraries on the Apache MyFaces Trinidad site.

ADF Faces, Trinidad

ADF Faces RC: The Quintessential Rollover Example

June 29th, 2007

Introduction

The following example demonstrates how-to create a rollover RCF style with an <af:popup>. This example demonstrates how to create a very simple RSS reader using Sun's RSS utilities. The RSS reader or Oracle Reader in this case, allows a user to enter a URL for an RSS feed and mouse over the titles for a specific feed to view a preview in a popup.

ADF FACE RC: Oracle Reader

The Devil In The Details...

If you have been following my previous examples there should be very few surprises in the code—of course I could be wrong. Two <af:clientListener> components are used to listen for mouse events, specifically the mouseOver and the mouseOut events. The former event is used to launch the popup and the latter closes the popup after it is displayed. So now, let’s discuss some of the more interesting aspects of this example. Specifically, <af:clientAttribute> and the clientComponent attribute that decorates RCF components.

The <af:clientAttribute> can be used to decorate any RCF component to define a name value pair that is delivered with a client-side event. Now, remember that client-side events are handled with JavaScript. Therefore, the <af:clientAttribute> declares an attribute on a JavaScript object. For all of this to be useful we need client side components to work with. Creating such a component in RCF is as simple as providing a boolean value for the clientComponet attribute--an attribute available on any layout or visually represented RCF component. By setting this attribute to "true" you declare the generation and delivery of a client-side peer for the origin server-side component. In simplest, terms a JavaScript interface for the component is delivered by the AJAX render kit that can be manipulated on the client via scripting. Note that by default a client-side representation is not generated for all RCF components. There are several rules that govern this, but a developer can override these rules in most cases with the clientComponent attribute. I will elaborate on these rules in my next post, but for know I leave you with this simple code snippet. Enjoy!

JSPX

XML:
  1. <?xml version='1.0' encoding='windows-1252'?>
  2. <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
  3.           xmlns:h="http://java.sun.com/jsf/html"
  4.           xmlns:f="http://java.sun.com/jsf/core"
  5.           xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
  6.   <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
  7.               doctype-system="http://www.w3.org/TR/html4/loose.dtd"
  8.               doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
  9.   <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  10.   <f:view>
  11.     <af:document>
  12.       <af:form>
  13.         <af:popup id="feedPreview" contentDelivery="immediate"
  14.                   clientComponent="true">
  15.           <af:panelGroupLayout clientComponent="true"
  16.                                inlineStyle="width:400px;height:300px;"
  17.                                layout="vertical">
  18.               <af:panelHeader id="cFeedHeader" clientComponent="true"
  19.                               text="none"/>
  20.               <af:outputFormatted id="cDesc" clientComponent="true"
  21.                                     value="none"/>
  22.           </af:panelGroupLayout>
  23.         </af:popup>
  24.         <af:panelAccordion inlineStyle="width:400px;">
  25.         <af:showDetailItem text="Oracle Reader">
  26.           <af:panelGroupLayout layout="vertical">
  27.           <af:panelGroupLayout layout="horizontal" halign="left" inlineStyle="width:100%;">
  28.             <af:inputText value="#{FeedBean.feed}" autoSubmit="true" columns="50"/>
  29.             <af:commandButton id="submitButton" text="Submit"
  30.                               actionListener="#{FeedBean.processFeed}"
  31.                               partialSubmit="true"></af:commandButton>
  32.             </af:panelGroupLayout>
  33.             <af:panelHeader text="Headlines" inlineStyle="border-width:1px;" partialTriggers="submitButton">
  34.               <af:panelGroupLayout layout="scroll">
  35.               <h:panelGrid columns="1">
  36.                 <af:forEach var="item" items="#{FeedBean.feedItems}">
  37.                   <af:panelGroupLayout layout="vertical">
  38.                     <af:goLink text="#{item.title.text}"
  39.                                destination="#{item.link.text}">
  40.                       <af:clientAttribute name="cDesc"
  41.                                           value="#{item.description.text}"/>
  42.                       <af:clientAttribute name="cFeedHeader"
  43.                                           value="#{item.title.text}"/>
  44.                       <af:clientListener method="onMouseOver" type="mouseOver"/>
  45.                       <af:clientListener method="onMouseOut" type="mouseOut"/>
  46.                     </af:goLink>
  47.                     <af:outputText value="From #{item.author}" rendered="#{item.author ne null}"/>
  48.                     <af:spacer height="5px" rendered="#{item.author eq null}"/>
  49.                   </af:panelGroupLayout>
  50.                 </af:forEach>
  51.                </h:panelGrid>
  52.               </af:panelGroupLayout>
  53.             </af:panelHeader>
  54.           </af:panelGroupLayout>
  55.         </af:showDetailItem>
  56.         </af:panelAccordion>
  57.       </af:form>
  58.       <f:facet name="metaContainer">
  59.         <f:verbatim>
  60.           <![CDATA[
  61.           <script>
  62.             function onMouseOver(event) {
  63.                 // source component from event
  64.                 var source = event.getSource();
  65.                 // set focus on source component
  66.                 source.focus();
  67.                 // find client dialog component
  68.                 var popup = AdfPage.PAGE.findComponent("feedPreview");
  69.                 // find ouputText component
  70.                 var desc = popup.findComponent("cDesc");
  71.                 // set value to clientAttribute value
  72.                 desc.setValue(source.getProperty("cDesc"));
  73.                 // find panelHeader   
  74.                 var header = popup.findComponent("cFeedHeader");
  75.                 // set value to clientAttribute value
  76.                 header.setText(source.getProperty("cFeedHeader"));
  77.                 // create hints to align popup
  78.                 var hints = {};
  79.                 hints[AdfRichPopup.HINT_ALIGN] = AdfRichPopup.ALIGN_END_BEFORE;
  80.                 hints[AdfRichPopup.HINT_ALIGN_ID] = source.getClientId();
  81.                 // show popup with hints
  82.                 popup.show(hints);
  83.             }
  84.              
  85.             function onMouseOut(event) {
  86.                 // find client dialog component
  87.                 var popup = AdfPage.PAGE.findComponent("feedPreview");
  88.                 // hide popup
  89.                 popup.hide();
  90.             }
  91.         </script>]]>
  92.         </f:verbatim>
  93.       </f:facet>
  94.     </af:document>
  95.   </f:view>
  96. </jsp:root>

Managed Bean: FeedBean

JAVA:
  1. package com.thepeninsulasedge.view.managed;
  2.  
  3. import com.sun.cnpi.rss.elements.Item;
  4. import com.sun.cnpi.rss.elements.Rss;
  5. import com.sun.cnpi.rss.parser.RssParser;
  6. import com.sun.cnpi.rss.parser.RssParserFactory;
  7.  
  8. import java.net.URL;
  9.  
  10. import java.util.ArrayList;
  11. import java.util.Collection;
  12.  
  13. import javax.faces.event.ActionEvent;
  14.  
  15. public class FeedBean {
  16.     private String myFeed;
  17.     private Rss myRss;
  18.  
  19.  
  20.     public FeedBean() {
  21.         readFeed("http://feeds.feedburner.com/gigaomnetwork");
  22.     }
  23.  
  24.     public void setFeed(String feed) {
  25.         this.myFeed = feed;
  26.     }
  27.  
  28.     public String getFeed() {
  29.         return myFeed;
  30.     }
  31.  
  32.     public void processFeed(ActionEvent evt) {
  33.         myRss = readFeed(myFeed);
  34.     }
  35.  
  36.     private Rss readFeed(String url) {
  37.         Rss result = null;
  38.         try {
  39.             RssParser parser = RssParserFactory.createDefault();
  40.             result = parser.parse(new URL(url));
  41.         } catch (Exception e) {
  42.             e.printStackTrace();
  43.         }
  44.         return result;
  45.     }
  46.  
  47.     public Collection getFeedItems() {
  48.         if (myRss != null) {
  49.             Collection<Item> result = myRss.getChannel().getItems();
  50.             return result;
  51.         } else {
  52.             return new ArrayList();
  53.         }
  54.     }
  55.  
  56. }

ADF Faces Rich Client, Oracle ADF, RCF

Apache MyFaces Trinidad 1.0.1 Released

June 23rd, 2007

Trinidad 1.0.1 has been released! This an exciting update to the popular JSF component set. For starters, it is the first major release since Trinidad graduated form Apache's incubation site. Note that release 1.0.2, introduces some significant architectural changes, namely the replacement of Trindad's iFrame based Partial Page Refresh functionality with a "true" XMLHttpRequest based equivalent. The only component no effect by this changed is the file upload component. Thats right Trinidad will soon be AJAX-enabled!

For more details visit the Apache MyFaces Trinidad site.

ADF Faces, Trinidad

ADF Faces RC: More on JavaScript

June 22nd, 2007

In my last post I demonstrated how to register a JavaScript function as a client listener. The client listener tested whether a value entered in an input text field is numeric. In this post we will take a look at how to again use the client listener component, but this time we will learn how to associate the listener with the onLoad event of a page. It is often the case in Web development that we want execute a bit of JavaScript prior to a page loading in its entirety. Let's take a look at how we can achieve this in the context of ADF Faces RC.

The first thing that we need to understand is the <af:document>. This is more or less a convenience tag used to generate <html>,<head>, and <body> html tags. The <af:document> as includes a metaContainer facet that allows you to declare elements or in our case JavaScript that is to be include in the meta element of the <head> tag. Any JavaScript you wish to be called on a load event must be declared in the metaContainer facet. In addition to the metaContainer facet, the <af:document> also allows the <af:clientListener> as child, it is this component that is used to associate a JavaScript function with the load event.

In this very simple example, the client listener is used to associate a JavaScript function with an onload event. The function is used to launch an in-window popup or dialog and demonstrates how to accomplish this programmatically rather taking the declarative approach with the <af:showPopupBehavior> component. This use-case could easily be modified to display a login screen on the initial load of a page.

adf faces rcf login

Note: The code in this example does not contain the template shown in the image above, although the page template is available in the Fusion Order Demo.

XML:
  1. <?xml version='1.0' encoding='windows-1252'?>
  2. <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
  3.           xmlns:f="http://java.sun.com/jsf/core"
  4.           xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
  5.           xmlns:h="http://java.sun.com/jsf/html">
  6.   <jsp:directive.page contentType="text/html;charset=windows-1252"/>
  7. <f:view>
  8.     <af:document>
  9.             <af:clientListener method="showLoginPopup" type="load"/>
  10.       <af:form>
  11.             <af:panelGroupLayout>
  12.             <af:popup id="loginPopup">
  13.               <af:dialog closeIconVisible="false" title="Login"
  14.                          okVisible="false" visible="true" cancelVisible="false">
  15.                 <af:panelFormLayout>
  16.                   <af:inputText label="Username" />
  17.                   <af:inputText label="Password" secret="true"/>
  18.                 </af:panelFormLayout>
  19.                 <f:facet name="buttonBar">
  20.                   <af:commandButton text="Login" accessKey="L" id="loginButton"
  21.                                     action="login"/>
  22.                 </f:facet>
  23.               </af:dialog>
  24.             </af:popup>
  25.             </af:panelGroupLayout>
  26.     </af:form>
  27.       <f:facet name="metaContainer">
  28.                  <f:verbatim>
  29.             <![CDATA[
  30.             <script>
  31.                     function showLoginPopup(event) {
  32.                       var popup = AdfPage.PAGE.findComponent("loginPopup");
  33.                       popup.show();
  34.                     }   
  35.             </script>
  36.             ]]>
  37.             </f:verbatim>       
  38.       </f:facet>
  39.     </af:document>
  40.   </f:view>
  41. </jsp:root>

ADF Faces Rich Client, Oracle ADF, RCF