Developing Applications with Oracle Visual Builder
Total Page:16
File Type:pdf, Size:1020Kb
Oracle® Cloud Developing Applications with Oracle Visual Builder Release 21.10.0 F43660-01 August 2021 Oracle Cloud Developing Applications with Oracle Visual Builder, Release 21.10.0 F43660-01 Copyright © 2018, 2021, Oracle and/or its affiliates. Primary Author: Oracle Corporation This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs) and Oracle computer documentation or other Oracle data delivered to or accessed by U.S. Government end users are "commercial computer software" or "commercial computer software documentation" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, reproduction, duplication, release, display, disclosure, modification, preparation of derivative works, and/or adaptation of i) Oracle programs (including any operating system, integrated software, any programs embedded, installed or activated on delivered hardware, and modifications of such programs), ii) Oracle computer documentation and/or iii) other Oracle data, is subject to the rights and limitations specified in the license contained in the applicable contract. The terms governing the U.S. Government’s use of Oracle cloud services are defined by the applicable contract for such services. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle, Java, and MySQL are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Inside 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, Epyc, and the AMD logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle. Contents Part I The Basics 1 Get Started with Visual Builder About Oracle Visual Builder 1-1 How to Begin with Oracle Visual Builder Subscriptions 1-2 Access Oracle Visual Builder 1-2 Information About Cookies 1-3 2 Anatomy of Visual Applications Understand Variables 2-2 Variables and Parameter Passing 2-3 Expressions 2-4 Variables and Lifecycles 2-5 Variables and Events 2-5 Understand Actions and Action Chains 2-5 Action Chain Context and Contract 2-6 Built-in Actions 2-6 Event Handling for Action Chains 2-7 Understand Page Flows and Lifecycles 2-7 The Lifecycle of a Page 2-7 Page Navigation 2-9 Understand UI Components 2-9 The Component Contract 2-10 Properties 2-10 Events 2-11 Child Slots 2-11 Methods 2-11 Component IDs and Styles 2-11 Understand Data Access Through REST 2-11 Data Binding 2-12 iii Mapping to and from REST 2-12 Part II Develop and Manage 3 Develop Applications Typical Visual Application Development Workflow 3-1 How are Visual Applications Structured? 3-2 What is the Designer? 3-4 Create Applications 3-6 Create a Visual Application 3-6 Create a New Web Application 3-9 Create a New Mobile Application 3-11 Add a Custom Plugin to Your Mobile Application 3-13 Control a Visual Application’s Behavior 3-16 Create a Copy of an Application 3-17 Design Pages 3-18 Use the Page Designer 3-18 The Page Designer Toolbar 3-19 The Page Editor 3-19 The Components Palette 3-21 The Structure View 3-21 The Properties Pane 3-23 Activate Role-Based Application Preview 3-23 Use the Diagram View 3-24 Use Keyboard Shortcuts 3-25 Work with Pages and Page Layouts 3-26 Create Pages 3-26 Edit the App Header and Footer 3-27 About Containers and Layout Components in Pages 3-27 Add a Container or Layout Component to a Page 3-30 Add Components to Pages 3-32 About Page Components 3-32 Add a Component From the Components Palette 3-33 Add a Component Using Code Completion in the Code Editor 3-34 Manage Component Visibility Using Conditions 3-35 Add Dynamic Components to Pages 3-39 Add an Image to a Page 3-91 Add an Icon Component to a Page 3-92 Add a Camera Component to a Page 3-94 Filter Data Displayed in a Component 3-101 iv Create a Filter for Component Data 3-102 Filter Component Data by Text 3-105 Quick Starts 3-108 Add Page Functionality Using Quick Starts 3-108 Add Data to a Table or List 3-110 Add a Create Page With a Quick Start 3-112 Add an Edit Page With the Quick Start 3-114 Add a Details Page With the Quick Start 3-116 Quick Starts for Dynamic Forms and Tables 3-118 Work with Code Editors 3-118 Work with the JavaScript Editor 3-121 Work with Variables and Types 3-123 About Variables and Types 3-123 Create Variables in Artifacts 3-124 Create a Custom Type 3-127 Create a Custom Type From an Endpoint 3-128 Create a Custom Type From Code 3-130 Work with Flows 3-135 Create a Page Flow 3-135 Set the Default Page for a Flow 3-136 Embed a Flow Within a Page 3-136 Navigate Between Flows in the Root Page 3-138 Work with Actions and Action Chains 3-141 About Action Chains 3-141 Create an Action Chain 3-142 Built-in Actions 3-149 Add an Assign Variables Action 3-151 Add a Call Action Chain Action 3-153 Add a Call Component Action 3-155 Add a Call Function Action 3-157 Add a Navigate Action 3-158 Add a Call Variable Action 3-160 Add a Call REST Action 3-161 Add a Fire Event Action 3-166 Add a Fire Notification Action 3-166 Add a Logout Action 3-167 Add a Scan Barcode Action 3-168 Test Action Chains 3-171 Test Action Chains Using the vb-test Grunt Task 3-173 Start an Action Chain From a Component 3-174 Start an Action Chain When a Variable Changes 3-178 v Start an Action Chain From a Lifecycle Event 3-179 Start an Action Chain From an Action Chain 3-182 Migrate an Action Chain 3-183 Work With Events and Event Listeners 3-185 Define Events in Your Application 3-186 Create Event Listeners for Events 3-186 Choose How Custom Events Call Event Listeners 3-189 Secure the Application 3-190 Security on Web and Mobile Apps 3-190 About Authentication Roles and User Roles 3-191 About Anonymous Access 3-193 Allow Anonymous Access 3-194 Manage User Roles and Access 3-197 Embed a Web Application 3-199 Configure Basic Authentication for a Mobile Application 3-200 Add Offline Capabilities to Your Application 3-202 Add Offline Support Using the Oracle Offline Persistence Kit 3-202 Work with Application Resources 3-206 About Application Resources 3-206 Import Resources 3-207 Export Resources 3-208 Work with the Image Gallery 3-210 Add a Sitemap to a Web Application's Resources 3-212 Work with Oracle JET Web Components 3-215 About Oracle JET Web Components 3-215 Work with the Component Exchange 3-217 Get Components From the Component Exchange 3-218 Update a Component from the Component Exchange 3-218 Uninstall a Component 3-220 Import a Web Component Archive 3-220 Create a Web Component 3-222 Work with Translations 3-223 About Translation Resources 3-223 Understand the Structure of Translation Bundles 3-223 Understand Translation Keys for Display Texts 3-225 Generate Translation Keys for Display Texts 3-226 Download Bundles for Translation 3-227 Use Translation Strings in JavaScript Files 3-229 Upload Translated Files 3-231 Create Translation Bundles 3-233 Manage Custom Component, CSS, and Module Imports 3-234 vi Integrate Your Application With a Git Repository 3-236 About Git Integration 3-236 Add Credentials for Your Oracle Visual Builder Studio Account 3-237 Link Your Visual Application to a Git Repository 3-237 Pull Files From Your Git Repository 3-238