An Oracle White Paper Oct ADF Faces Layout Basics

Similar documents
Creating Custom Project Administrator Role to Review Project Performance and Analyze KPI Categories

Generate Invoice and Revenue for Labor Transactions Based on Rates Defined for Project and Task

Tutorial on How to Publish an OCI Image Listing

April Understanding Federated Single Sign-On (SSO) Process

An Oracle White Paper December, 3 rd Oracle Metadata Management v New Features Overview

An Oracle White Paper November Primavera Unifier Integration Overview: A Web Services Integration Approach

Oracle WebCenter Portal 11g Developer Workshop

Veritas NetBackup and Oracle Cloud Infrastructure Object Storage ORACLE HOW TO GUIDE FEBRUARY 2018

Installation Instructions: Oracle XML DB XFILES Demonstration. An Oracle White Paper: November 2011

Oracle Data Provider for.net Microsoft.NET Core and Entity Framework Core O R A C L E S T A T E M E N T O F D I R E C T I O N F E B R U A R Y

Oracle Service Cloud Agent Browser UI. November What s New

Oracle Fusion Configurator

PeopleSoft Fluid Navigation Standards

JD Edwards EnterpriseOne Licensing

Configuring Oracle Business Intelligence Enterprise Edition to Support Teradata Database Query Banding

Correction Documents for Poland

APPLICATION BUILDER CLOUD. Application Creation Made Easy

Product Release Notes

Oracle Secure Backup. Getting Started. with Cloud Storage Devices O R A C L E W H I T E P A P E R F E B R U A R Y

TABLE OF CONTENTS DOCUMENT HISTORY 3

StorageTek ACSLS Manager Software Overview and Frequently Asked Questions

Load Project Organizations Using HCM Data Loader O R A C L E P P M C L O U D S E R V I C E S S O L U T I O N O V E R V I E W A U G U S T 2018

Oracle CIoud Infrastructure Load Balancing Connectivity with Ravello O R A C L E W H I T E P A P E R M A R C H

Handling Memory Ordering in Multithreaded Applications with Oracle Solaris Studio 12 Update 2: Part 2, Memory Barriers and Memory Fences

WebCenter Portal Task Flow Customization in 12c O R A C L E W H I T E P A P E R J U N E

Oracle Enterprise Performance Reporting Cloud. What s New in the November Update (16.11)

See What's Coming in Oracle Express CPQ for Salesforce.com

Pricing Cloud: Upgrading to R13 - Manual Price Adjustments from the R11/R12 Price Override Solution O R A C L E W H I T E P A P E R A P R I L

Oracle Cloud Applications. Oracle Transactional Business Intelligence BI Catalog Folder Management. Release 11+

Automatic Receipts Reversal Processing

October Oracle Application Express Statement of Direction

Oracle Enterprise Performance Reporting Cloud. What s New in September 2016 Release (16.09)

VISUAL APPLICATION CREATION AND PUBLISHING FOR ANYONE

Oracle Enterprise Performance Reporting Cloud. What s New in February 2017 Update (17.02)

Oracle Financial Consolidation and Close Cloud. What s New in the November Update (16.11)

Oracle Service Registry - Oracle Enterprise Gateway Integration Guide

Using the Oracle Business Intelligence Publisher Memory Guard Features. August 2013

Oracle WebLogic Portal O R A C L E S T A T EM EN T O F D I R E C T IO N F E B R U A R Y 2016

An Oracle White Paper October The New Oracle Enterprise Manager Database Control 11g Release 2 Now Managing Oracle Clusterware

An Oracle White Paper July Oracle WebCenter Portal: Copying a Runtime-Created Skin to a Portlet Producer

Working with Time Zones in Oracle Business Intelligence Publisher ORACLE WHITE PAPER JULY 2014

Oracle FLEXCUBE Direct Banking Release Dashboard Widgets Transfer Payments User Manual. Part No. E

Oracle Enterprise Performance Reporting Cloud

Achieving High Availability with Oracle Cloud Infrastructure Ravello Service O R A C L E W H I T E P A P E R J U N E

CONTAINER CLOUD SERVICE. Managing Containers Easily on Oracle Public Cloud

DATA INTEGRATION PLATFORM CLOUD. Experience Powerful Data Integration in the Cloud

Loading User Update Requests Using HCM Data Loader

Oracle DIVArchive Storage Plan Manager

Oracle WebCenter Portal 11g Developer Workshop

Technical Upgrade Guidance SEA->SIA migration

Revision History Overview Feature Summary Knowledge Management Policy Automation Platform Agent Browser Workspaces Agent Browser Desktop Automation

Oracle Enterprise Performance Reporting Cloud. What s New in June 2017 Update (17.06)

Oracle NoSQL Database Parent-Child Joins and Aggregation O R A C L E W H I T E P A P E R A P R I L,

Leverage the Oracle Data Integration Platform Inside Azure and Amazon Cloud

Oracle Express CPQ for Salesforce.com. What s New in Summer 15

An Oracle White Paper March How to Define an Importer Returning Error Messages to the Oracle Web Applications Desktop Integrator Document

Oracle Express CPQ for Salesforce.com

RAC Database on Oracle Ravello Cloud Service O R A C L E W H I T E P A P E R A U G U S T 2017

August 6, Oracle APEX Statement of Direction

Integrating Oracle SuperCluster Engineered Systems with a Data Center s 1 GbE and 10 GbE Networks Using Oracle Switch ES1-24

TABLE OF CONTENTS DOCUMENT HISTORY 3

TABLE OF CONTENTS DOCUMENT HISTORY 3

Siebel CRM Applications on Oracle Ravello Cloud Service ORACLE WHITE PAPER AUGUST 2017

Oracle FLEXCUBE Direct Banking Release Corporate Cash Management User Manual. Part No. E

Oracle Virtual Directory 11g Oracle Enterprise Gateway Integration Guide

Oracle Learn Cloud. What s New in Release 15B.1

Oracle NoSQL Database Parent-Child Joins and Aggregation O R A C L E W H I T E P A P E R M A Y,

Oracle Data Masking and Subsetting

Oracle WebCenter Portal 11g Developer Workshop

Oracle CPQ Cloud for Salesforce.com

Frequently Asked Questions Oracle Content Management Integration. An Oracle White Paper June 2007

Oracle Business Activity Monitoring 12c Best Practices ORACLE WHITE PAPER DECEMBER 2015

NOSQL DATABASE CLOUD SERVICE. Flexible Data Models. Zero Administration. Automatic Scaling.

Oracle PeopleSoft PeopleTools 8.54 Product Documentation Update. PeopleSoft Fluid User Interface

Oracle Database 10g Release 2 Database Vault - Restricting the DBA From Accessing Business Data

Oracle Taleo Cloud for Midsize (Taleo Business Edition)

Oracle Enterprise Data Quality New Features Overview

Application Container Cloud

Migrating VMs from VMware vsphere to Oracle Private Cloud Appliance O R A C L E W H I T E P A P E R O C T O B E R

Bastion Hosts. Protected Access for Virtual Cloud Networks O R A C L E W H I T E P A P E R F E B R U A R Y

Product Release Notes

Oracle Flash Storage System QoS Plus Operation and Best Practices ORACLE WHITE PAPER OCTOBER 2016

Oracle Learn Cloud. Taleo Release 16B.1. Release Content Document

An Oracle Technical Article March Certification with Oracle Linux 4

An Oracle White Paper June Exadata Hybrid Columnar Compression (EHCC)

Cloud Operations for Oracle Cloud Machine ORACLE WHITE PAPER MARCH 2017

Oracle FLEXCUBE Direct Banking Release Dashboard Widgets Customer Services User Manual. Part No. E

Handling Memory Ordering in Multithreaded Applications with Oracle Solaris Studio 12 Update 2: Part 1, Compiler Barriers

Product Release Notes

Benefits of an Exclusive Multimaster Deployment of Oracle Directory Server Enterprise Edition

An Oracle White Paper September Security and the Oracle Database Cloud Service

Oracle Financial Consolidation and Close Cloud. What s New in the August Update (17.08)

An Oracle White Paper October Deploying and Developing Oracle Application Express with Oracle Database 12c

Oracle Responsys. Release 18B. New Feature Summary ORACLE

See What's Coming in Oracle Taleo Business Edition Cloud Service

Deploy VPN IPSec Tunnels on Oracle Cloud Infrastructure. White Paper September 2017 Version 1.0

Hard Partitioning with Oracle VM Server for SPARC O R A C L E W H I T E P A P E R J U L Y

Oracle JD Edwards EnterpriseOne Object Usage Tracking Performance Characterization Using JD Edwards EnterpriseOne Object Usage Tracking

Subledger Accounting Reporting Journals Reports

An Oracle White Paper October Oracle Social Cloud Platform Text Analytics

Transcription:

An Oracle White Paper Oct 2013 ADF Faces Layout Basics

Disclaimer The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle.

Overview of Layouts in ADF Faces... 1 Introduction... 1 Geometry Management... 2 Different Layouts provided by ADF Faces... 3 Layout Components... 3 Stretchable by its parent and stretch its children... 3 Stretchable by its parent component and don t stretch children... 5 Not stretchable by its parent and don t stretch children... 5 Reverse Engineering... 5 Reverse Engineering Facebook... 5 Reverse Engineering Gmail... 8 Reverse Engineering Twitter... 11 Solutions to frequent layout scenarios... 14 Aligning a form at the center of the page... 14 Designing the table/treetable... 15 Tips... 16 Summary... 16 Additional Resources... 16 ADF Faces Layout Basics

Overview of Layouts in ADF Faces Layouts in ADF Faces are built using layout components. In ADF Faces, layout components have a specific behavior in which contained child components are placed on a page or view. There are many layout components offered by ADF Faces out of the box, some of them can be stretched by a parent container, some of them can stretch the components they contain and some of them can do both. Introduction Layouts play an important role in user experience and acceptance of application user interfaces. This whitepaper provides basic information about different layout components offered by ADF Faces, by example of reverse engineering of selected popular web user interfaces to explain the usage of different layout components, solutions to some frequent questions and best practices. This whitepaper also shows how to use different layout components in combination to achieve a complex page design. 1

Geometry Management Modern web layouts don't treat all areas equally in that some need to stretch to claim maximum space and others don't but scroll instead. We need to allow stretching some of the contents, scroll some of the contents and keep some of the contents static. The resize behavior of ADF Faces components is referred to as geometry management, which Ensures components to properly respond to browser resizing. Lays out components to fit into the size available on a specific area of the view. Handles the stretch behavior based on parent or child component settings. Resizing and the geometry management of the components can be imagined to one of the puzzle pieces, as shown in Figure 1. Figure 1.Different categories of components for geometry management. Below table provides comparative overview on layouts which can be stretched by parent and stretch its children. TABLE 1. GEOMETRY MANAGEMENT OF DIFFERENT ADF LAYOUT COMPONENTS LAYOUT NAME STRETCHABLE BY PARENT STRETCH ITS CHILDREN panelstretchlayout Yes Yes panelgrouplayout Yes (if layout is scroll/vertical) No panelborderlayout No No panelformlayout No No panelgridlayout Yes Yes panelaccordion Yes Yes panelsplitter Yes Yes 2

paneltabbed Yes Yes paneldashboard Yes Yes panelbox Yes Yes (only if being stretched by parent) decorativebox Yes Yes panelcollection Yes Yes panelheader Yes Yes (only if being stretched by parent) paneldrawer Yes Yes panelspringboard Yes Yes Different Layouts provided by ADF Faces All the ADF Layout components hold the UI components either as direct children or in a special location, which are defined as facets. The names of these facets differ by components and some components don t even have facets. Developers new to ADF Faces may be overwhelmed by the choice of layout components wondering which ones to choose for a specific layout to build. Common usage pattern for some of the ADF Faces layout components are described below. Layout Components To map available ADF Faces layout components to their use, let us look at frequent developer questions with respect to their stretch-ability. Stretchable by its parent and stretch its children Which component can I use as the parent container for whole of my page? or Which component I can use to stretch the content? panelstretchlayout : This has 5 facets (top, start, center, end and bottom) Use this layout s center facet to place stretchable content. Can be used as a parent container for the page. How do I put series of contents in different panels, which can individually be expanded/collapsed by the user? panelaccordion : No facets Use this in order to let the user to expand / collapse the contents. We can place multiple af:showdetailitem inside this component. I want to build a layout as grid. Is there any component I can make use of? panelgridlayout : This has no facets, but has gridrow and gridcell children 3

Use this layout to construct island contents as grid (rows and columns) I want to split the page into two parts, and user can adjust the size of it. panelsplitter : This has two facets (first and second) Use this to divide the page into two parts (horizontal/vertical). A splitter will be provided, using which the size of the divided portions can be adjusted. My page contains many sub-pages, and I want to show them in different tabs. paneltabbed : No facets Use this layout to show the contents in different tabs. I am building a dashboard with multiple panels inside in it. How do I achieve it? paneldashboard : No facets Use this layout to tile the panelboxes / regions. Can leverage the option of dragging the panels (move) to different locations with the help of component drag source tag. I want to display supporting information in the page. panelbox : This has one facet (toolbar) The panelbox is used to place ancillary information on a page, offset by a certain color. I want to display an information to the user and want it to look better than panelbox. decorativebox : This has two facets (center and top) Use it to give a bordered look for the content Theme can be changed dynamically for the child components to give different look and feel at runtime. My page contains a table. I want to let the users to show/hide columns at runtime. panelcollection : This has 6 facets (aftertoolbar, menus, secondarytoolbar, statusbar, toolbar, viewmenu) Surround the table / treetable inside this layout in order to get some additional features (show/hide columns, freeze columns etc.). Do we have any component, using which we can display information with a header? panelheader : This has 6 facets (context, help, info, legend, menubar, toolbar) This component can also be used to display informational messages in the page. I need to have floating tabs, which should get activated and show details when clicked. paneldrawer : No facets Use this to toggle the contents in the tab (like closing and opening the drawer) I would like to create group of items/icons as a strip and also as a grid. Is there any such components in ADF? panelspringboard : No facets Use this to display the group of contents as icons in a Strip / Grid 4

Stretchable by its parent component and don t stretch children ADF Faces offers some components which can be stretched by its parent, but cannot stretch its children. I want to make the components in my page to be laid out horizontally / vertically. panelgrouplayout : This has 1 facet (separator) Use this layout to logically group the contents (horizontal/vertical/scroll). Not stretchable by its parent and don t stretch children There are some components which cannot be stretched by its parent and cannot stretch its children I want to make the components in my page to be laid out horizontally / vertically without stretching the child components. panelborderlayout : This has 12 facets (start, innerstart, top, innertop, left, innerleft, end, innerend, right, innertright, bottom and innerbottom) Use this layout to logically group the contents that are not stretchable, in different locations. I am building a page with input components as form. Which layout component should I use? panelformlayout : This has 1 facet (footer) Use this layout to create a form with aligned labels and form fields (ex. Registration form / Reservation form / Login form etc.). Set the rows & columns properties of this layout to arrange the fields Reverse Engineering As we ve gained some basic knowledge about different layouts and their stretch-ability, we can visualize some of the popular websites and reverse engineer those using ADF Faces. Let us take the following websites for construction Facebook. Gmail Twitter Reverse Engineering Facebook Main page of Facebook contains the layout as shown in Figure 2. 5

Facebook and the Facebook logo are registered trademarks of Facebook Inc. Figure 2.Screenshot of Facebook s main page. If we split up the UI, these are different components Stretchable outer container 1. Non-stretchable/non-scrollable header 2. Non-stretchable/non-scrollable left panel 3. Non-stretchable/scrollable center panel 4. Non-stretchable/non-scrollable right panel 5. Non-stretchable/scrollable rightmost panel This can be visualized like the image shown in Figure 3. 6

Figure 3.Mockup of Facebook s main page. To create the similar layout in ADF Faces, we can use the combination of following layout components. af:panelstretchlayout This will stretch its children af:panelgrouplayout layout= scroll can be used to for the scrollable area af:panelgridlayout With gridrow and gridcell(s) for splitting right area into two And the rough design of it in ADF Faces will be similar to the image shown in Figure 4. 7

Figure 4.Rough design of Facebook s main page in ADF Faces. To achieve this, this is how we can design the layout. af:panelstretchlayout for the outer stretchable container This will make sure the whole page can be stretched af:panelgrouplayout/af:panelgridlayout in the top facet of the parent to get the branding bar Using which, we can place the relevant icons / images / links etc., in required location. af:panelgrouplayout inside the start facet. This will allow us to place the contents in the left side of the page. af:panelgrouplayout with layout= scroll in the center facet This will let us have a scrollable container in the middle portion. af:panelgridlayout with gridrow and 2 gridcells in the end facet This will split the right portion of the page into two parts. Reverse Engineering Gmail Main page of Gmail look like the image shown in Figure 5. 8

Google and the Google logo are registered trademarks of Google Inc. Figure 5.Screenshot of Gmail s main page. This UI has been formed with somewhat similar to following parts. Stretchable outer container 1. Non-stretchable/non-scrollable 1st panel - header (menu bar) 2. Non-stretchable/non-scrollable 2nd panel header with branding bar 3. Non-stretchable/non-scrollable 3rd panel sub-menu bar 4. Non-stretchable/non-scrollable 4th panel advertisement bar 5. Non-stretchable/ scrollable top left panel 6. Non-stretchable/ scrollable bottom left panel 7. Non-stretchable/scrollable right panel This can be visualized like the image shown in Figure 6. 9

Figure 6.Mockup of Gmail s main page. The rough design of it using ADF Faces can be like Figure 7. Figure 7.Rough design of Gmail s main page in ADF Faces. 10

To achieve this, this is how we can design the layout. af:panelstretchlayout for the outer stretchable container Using which, the page will be made as stretchable af:panelgridlayout in the center facet of the parent to get rows and column layout (with 4 grid rows to simulate top 4 non-scrollable/non-stretchable panels) Can add an af:panelgrouplayout inside the grid cells for wrapping the contents if needed. Combination of af:panelgridlayout and af:panelgrouplayout to get the bottom panels. Can use layout= scroll for getting the scrollable panel (bottom right) Reverse Engineering Twitter Twitter UI look simple and does not have many complex combinations. Figure 8 shows Twitter main page. Twitter and the Twitter logo are registered trademarks of Twitter Inc. Figure 8.Screenshot of Twitter s main page. This page can be split into following parts. Stretchable outer container 1. Non-stretchable/non-scrollable top panel - header (menu bar) 2. 3 non-stretchable/non-scrollable left panels 11

3. Non-stretchable/non-scrollable right panel 4. Non-stretchable/ scrollable bottom right panel 5. Free spaces on the left and right side of the page If the split up is visualized, it will look similar to the image shown in Figure 9. Figure 9.Mockup of Twitter s main page. The rough design of it using ADF Faces can be like the image shown in Figure 10. 12

Figure 10.Rough design of Twitter s main page in ADF Faces. To achieve this, this is how we can design the layout. af:panelstretchlayout for the outer stretchable container For stretching the entire page. Combination of af:panelgrouplayout(s) and af:panelstretchlayout to form the inner containers. Can use nested af:panelgrouplayouts with layout as horizontal and vertical to form two columns of panels. af:panelbox(s)/af:decorativebox(s) inside the af:panelgrouplayout(s) for forming the individual islands. Parent container s start and end facets used for the free space on the left and right side of the page. Above examples are purely on designing the outer layer of the pages. For laying out the inner layers, we can use combination of other layout components like af:paneltabbed, af:panellist, af:panelbox, af:decorativebox, af:panelsplitter, af:panelaccordion etc. 13

Solutions to frequent layout scenarios As we ve now designed some pages, let us take couple of frequently used layout scenarios and see how to implement them with ADF Faces. Aligning a form at the center of the page Frequent requirement of the developer is how to align a form (ex: login form) at the center of my page. We can achieve this with a combination of af:panelstretchlayout, af:panelgrouplayout and af:panelformlayout. Design the main container using af:panelstretchlayout. Add an af:panelgrouplayout in the center facet of the main container. Set its halign property to center and valign property to middle. Add an af:panelformlayout inside this to construct your form. Add empty af:panelgrouplayouts in the top and bottom facets of the main container as fillers. Set start&endwidth, top&bottomheight properties of the main container according to your need (ex: 100px) This can further be decorated with an af:panelbox / af:decorativebox as needed. Alternatively, this can also be achieved using panelgridlayout and panelformlayout Create a panelgridlayout with one row and a column. Set the height of the gridrow to 100% and width of the gridcell to 100% Set the valign property of the gridcell to middle and halign to center Add a panelformlayout inside the gridcell and add the UI Components inside in it. After designing it will roughly look like the image shown in Figure 11. 14

Figure 11.Login form aligned at the center of the page Designing the table/treetable Another frequent requirement is designing the af:table / af:treetable. To get more out of these components, we can surround them with an af:panelcollection. With the panelcollection, we get some extra options out of the box. Image 12 shows the difference between a table surrounded by panelcollection and the one without it. Figure 12.Screenshot of table surrounded with panelcollection and without panelcollection 15

Another key point in table / treetable is to adjust the width of them to fit the entire page. ADF provides a built-in global style selector AFStretchWidth for this scenario. Refer this documentation to know the global style selectors available in ADF Faces. Tips Use Page Templates for better layout design Make use of styleclasses Summary From this article, we ve now learnt the basic layout components in ADF, their geometry management, how to construct a layout for the page and to the answers for some of the frequently asked layout design questions. We ve also learned that ADF Faces is a component based UI framework Develop UIs in components not markup We can build sophisticated layouts in ADF Faces by nesting layout components Geometry management allows ADF Faces to automatically adapt to browser real estate changes Additional Resources Refer to these documents for more in depth information about the ADF Faces Layout Components. ADF Faces Layout Best Practices ADF Faces Tag Documentation Developing Web User Interfaces with Oracle ADF Faces 16

Oct 2013 Author: Arunkumar Ramamoorthy Oracle Corporation World Headquarters 500 Oracle Parkway Redwood Shores, CA 94065 U.S.A. Worldwide Inquiries: Phone: +1.650.506.7000 Fax: +1.650.506.7200 oracle.com Copyright 2013, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without our prior written permission. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0113