Understanding oracle APEX 5 application development, 2nd edition

335 130 0
Understanding oracle APEX 5 application development, 2nd edition

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

This new edition of Understanding Oracle APEX 5 Application Development shows APEX developers how to build practical, nontrivial web applications. The book introduces the world of APEX properties, explaining the functionality supported by each page component as well as the techniques developers use to achieve that functionality. The book is targeted at those who are new to APEX and just beginning to develop real projects for production deployment.Reading the book and working the examples will leave you in a good position to build goodlooking, highlyfunctional, web applications. Topics include: conditional formatting, usercustomized reports, data entry forms, concurrency and lost updates, and updatable reports. Accompanying the book is a demo web application that illustrates each concept mentioned in the book. Specific attention is given in the book to the thought process involved in choosing and assembling APEX components and features to deliver a specific result. Understanding Oracle APEX 5 Application Development is the ideal book to take you from an understanding of the individual pieces of APEX to an understanding of how those pieces are assembled into polished applications.Teaches how to develop nontrivial APEX applications.Provides deep understanding of APEX functionality.Shows the techniques needed for customization.

SECOND EDITION www.allitebooks.com For your convenience Apress has placed some of the front matter material after the index Please use the Bookmarks and Contents at a Glance links to access them www.allitebooks.com Contents at a Glance About the Author���������������������������������������������������������������������������� xiii About the Technical Reviewer��������������������������������������������������������� xv Acknowledgments������������������������������������������������������������������������� xvii Introduction������������������������������������������������������������������������������������ xix ■Chapter ■ 1: The SQL Workshop�������������������������������������������������������� ■Chapter ■ 2: Applications and Pages����������������������������������������������� 11 ■Chapter ■ 3: Regions����������������������������������������������������������������������� 27 ■Chapter ■ 4: Navigation������������������������������������������������������������������� 83 ■Chapter ■ 5: Items and Buttons����������������������������������������������������� 109 ■Chapter ■ 6: Session State������������������������������������������������������������ 133 ■Chapter ■ 7: Processes������������������������������������������������������������������ 161 ■Chapter ■ 8: Data Validation���������������������������������������������������������� 219 ■Chapter ■ 9: Branches������������������������������������������������������������������� 231 ■Chapter ■ 10: Tabular Forms��������������������������������������������������������� 247 ■Chapter ■ 11: Dynamic SQL����������������������������������������������������������� 263 ■Chapter ■ 12: Security������������������������������������������������������������������� 279 Index���������������������������������������������������������������������������������������������� 315 iii www.allitebooks.com www.allitebooks.com Introduction Application Express (otherwise known as APEX) is a web application that is tightly coupled to an Oracle database It has several uses: you can use its SQL Workshop tool to query the database, modify its contents, or change its structure; you can use its Application Builder tool to create your own web applications that interact with the database; and you can run the web applications created by you and others The application builder is especially interesting because it provides a simple, nontraditional way to build web pages You not specify code for the page directly; instead, you choose from a set of built-in templates There is a template for the overall page and templates for each kind of component that you want to put on the page (such as reports, buttons, and so on) Each template has a set of properties, whose values determine where each component is located on the page, what it looks like, and how it behaves You create a page simply by choosing templates for the components you want and assigning values to their properties The APEX application builder saves the property values for each component in a private database When a browser requests one of your application’s pages, the APEX server extracts the property values relevant to that page from its database, constructs the HTML code corresponding to those values, and returns that code to the browser This process is called rendering the page, and APEX is called an HTML generator The advantage of using an HTML generator such as APEX is that you can build web pages without any knowledge of HTML (or CSS, JavaScript, or PHP) Moreover, because APEX is tightly coupled to an Oracle database, it automatically handles the intricacies of database interaction APEX makes it possible to easily create good-looking, highly functional, and database-aware pages with only a rudimentary knowledge of SQL Why This Book? Designing a page with APEX seems straightforward — all you have to is choose the components you want and then assign the appropriate values to their properties Choosing components is straightforward, but assigning property values is not A page and its components have many properties, and you have to know the purpose of those properties to know what values to assign These properties range from the essential (such as the source query of a report) to the obscure (such as the static ID of a report) Some properties (such as the HTML expression of a report column) are hooks that allow you to insert customized HTML or JavaScript code into the generated web page The purpose of this book is to gently lead you through the cornucopia of properties To this end, the book develops a demo web application that illustrates various APEX techniques for building typical web-page functionality The pages of this application start out simply and gradually increase their level of sophistication With each page, xix www.allitebooks.com ■ Introduction I introduce a few new properties, discuss their purpose, and illustrate their usefulness By the end of the book, you will have been so immersed in the world of APEX properties that you should feel confident enough to tackle any web site project of your own And if your project requires even more sophistication than appears here, you should be comfortable enough to use properties that are not covered, perhaps by looking at the documentation, examining the numerous prepackaged applications provided by Oracle, checking a web forum, or even figuring it out on your own Another way to build web pages in APEX is to rely on wizards APEX provides wizards to generate common components, such as report pages, data entry forms, and tabular forms Each wizard asks you a series of questions (such as What is the name of the page? What table you want to display? Should the page have an entry in the navigation menu?) and then uses your responses to generate appropriate components having appropriate properties The advantage, of course, is that you don’t need to know anything about properties The disadvantage is that wizards tend to produce “one size fits all” pages, in terms of both their appearance and their functionality Wizards can take you only so far If you want any kind of control over the look, feel, and behavior of your page, you need to get involved with its properties This book provides the guidance you need Demo Application As this book explains each part of the APEX application builder, it guides you through the development of a small application I encourage you to build your own version of the application as you follow along You can run my version of the application by going to the URL apex.oracle.com/pls/apex/f?p=87059:1 You can also download the source code for the application from the Apress web site Unlike demo applications in many books, this application does not “do” anything particularly interesting Instead, each page is constructed to illustrate one or more techniques Some of the pages have similar functionality, in order to illustrate the tradeoffs between different implementation techniques The demo application uses the DEPT and EMP database tables provided with every APEX workspace The DEPT table lists the departments of a company, and the EMP table lists the employees in those departments Their columns are as follows: DEPT(DeptNo, DName, Loc) EMP (EmpNo, EName, Job, Mgr, HireDate, Sal, Comm, DeptNo) The key of DEPT is DeptNo, and the key of EMP is EmpNo Each table has a built-in sequence for generating unique values for these keys, as well as an associated insertion trigger If you insert a record into one of the tables and omit a value for the key, the trigger will automatically generate a key value from the appropriate sequence The demo application makes one modification to these tables: the EMP table has the additional column OffSite of type char(1) An employee will have the value ‘N’ for this column if the employee works in the department office, and ‘Y’ if the employee works offsite For your reference, here is the SQL code to add the new column alter table EMP add OffSite char(1); xx www.allitebooks.com ■ Introduction After altering the table, you will need to assign an Offsite value for each existing employee In my demo, the employees SCOTT, ALLEN, WARD, and TURNER work offsite; the others work onsite Chapter discusses the APEX tools needed to make these database modifications Required Background This book is for people who are comfortable using a database system and want to learn how to write nontrivial web applications in APEX Many of the techniques used to write APEX pages involve skills in the following database and web-design languages and technologies SQL The most important skill you need is the ability to write SQL queries All data access in APEX is performed via SQL statements, and the value of many properties involves SQL in some way The more fluent you are in SQL, the more sophisticated your reports and forms can be This book assumes that you are comfortable with SQL For the most part, the demo application uses relatively simple SQL statements, but occasionally I include something more complex (such as an outer join or nested query) to illustrate what is possible HTML This book also assumes that you are familiar with basic HTML — in particular, how tags such as

, , , and can be used to format text and display images Advanced features such as JavaScript and CSS are ignored PL/SQL APEX uses PL/SQL to specify behavior PL/SQL is Oracle’s programming language; its main feature is an embedded SQL syntax that makes it easy to write procedures that interact with the database Prior knowledge of PL/SQL is a plus, but not necessary This book introduces PL/SQL in Chapter and uses only basic features of the language APEX Finally, this book does not require you to have prior experience with APEX Although it is possible to follow the book without actually using APEX, doing so seems rather pointless So you should get an APEX account The easiest and best way to get an account is by going to the apex.oracle.com site Because I created my demo application from there, you should see the same screens that appear in this book xxi www.allitebooks.com ■ Introduction Distinguishing Screens from Pages APEX is a web application that is used to create other web applications Thus APEX has a home page, and its various tools have their own sets of pages Throughout this book, I describe how to use APEX to build a page of an application This can lead to some strange sentences, such as “Clicking the Run button from the application’s APEX home page runs its home page.” To avoid such confusion, I denote all APEX pages as “screens.” The previous sentence becomes “Clicking the Run button from the application’s home screen runs its home page,” which is less awkward and hopefully less confusing xxii www.allitebooks.com Chapter The SQL Workshop Congratulations! You are on the brink of learning how to build APEX web applications But before you can begin, you need an APEX account There are several ways to obtain an account: you can register for a free account through the apex.oracle.com web site; you might be given an account to an APEX server at your job; or you can even install an APEX server yourself and create your own account to it No matter the circumstance, your account will have an associated URL Invoking the URL from your browser takes you to a login screen Figure 1-1 shows the login screen used by the apex.oracle.com server Figure 1-1.  APEX login screen www.allitebooks.com Chapter ■ The SQL Workshop Entering your credentials then takes you to the APEX home screen, the top of which is shown in Figure 1-2 Figure 1-2.  APEX home screen The APEX development environment contains several tools Of primary importance is the application builder tool, which will be covered in depth starting in Chapter We begin here by looking at two tools from the APEX SQL Workshop: the object browser, and the SQL command tool These tools allow you to directly manipulate the database — the object browser gives you a graphical user interface, and the SQL command tool lets you submit SQL statements and PL/SQL code blocks for execution Although the SQL Workshop tools are not essential for application development, using them can make your life much easier Here are five ways that they can help an application developer: • To remind you of the database structure For example, a typical application involves several tables, each of which can have numerous columns It is often impractical to memorize the details of each one When building a page that references a table, you can use these tools to help refresh your memory • To modify the structure of the database For example, these tools are the easiest way to execute the alter table command given in the introduction • To modify the contents of the database For example, you might want to insert or modify records to test the behavior of a page or to reset the database after testing the page • To examine the contents of the database After running a page, you can verify that the database updated correctly • To debug an SQL statement or PL/SQL block By executing code in the SQL command tool first, you can verify that it produces the expected result before you actually assign it as the value of some property on a page www.allitebooks.com ■ Index „„         W, X, Y, Z Wizard-like interfaces basic info page, 237, 241 check box option, 238 confirmation page, 238 confirm employee, 243 continue button, 237 hiredate info page, 243 manager info page, 243 progress bar implementation, 239 321 Understanding Oracle APEX Application Development Second Edition Edward Sciore Understanding Oracle APEX Application Development Copyright © 2015 by Edward Sciore This work is subject to copyright All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed Exempted from this legal reservation are brief excerpts in connection with reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher’s location, in its current version, and permission for use must always be obtained from Springer Permissions for use may be obtained through RightsLink at the Copyright Clearance Center Violations are liable to prosecution under the respective Copyright Law ISBN-13 (pbk): 978-1-4842-0990-5 ISBN-13 (electronic): 978-1-4842-0989-9 Trademarked names, logos, and images may appear in this book Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made The publisher makes no warranty, express or implied, with respect to the material contained herein Managing Director: Welmoed Spahr Lead Editor: Jonathan Gennick Technical Reviewer: Darl Kuhn Editorial Board: Steve Anglin, Mark Beckner, Gary Cornell, Louise Corrigan, Jim DeWolf, Jonathan Gennick, Robert Hutchinson, Michelle Lowman, James Markham, Susan McDermott, Matthew Moodie, Jeffrey Pepper, Douglas Pundick, Ben Renow-Clarke, Gwenan Spearing, Matt Wade, Steve Weiss Coordinating Editor: Jill Balzano Copy Editor: Nancy Sixsmith Compositor: SPi Global Indexer: SPi Global Artist: SPi Global Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013 Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc) SSBM Finance Inc is a Delaware corporation For information on translations, please e-mail rights@apress.com, or visit www.apress.com Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use eBook versions and licenses are also available for most titles For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/bulk-sales Any source code or other supplementary material referenced by the author in this text is available to readers at www.apress.com For detailed information about how to locate your book’s source code, go to www.apress.com/source-code/ Contents About the Author���������������������������������������������������������������������������� xiii About the Technical Reviewer��������������������������������������������������������� xv Acknowledgments������������������������������������������������������������������������� xvii Introduction������������������������������������������������������������������������������������ xix ■Chapter ■ 1: The SQL Workshop�������������������������������������������������������� Object Browser���������������������������������������������������������������������������������������� SQL Command Tool��������������������������������������������������������������������������������� Summary������������������������������������������������������������������������������������������������� ■Chapter ■ 2: Applications and Pages����������������������������������������������� 11 Creating an Application������������������������������������������������������������������������� 11 Editing Application Properties��������������������������������������������������������������� 13 Deleting an Application������������������������������������������������������������������������� 15 Running an Application Page ��������������������������������������������������������������� 15 Running a Page from within APEX�������������������������������������������������������������������������� 15 Running a Page from Outside of APEX�������������������������������������������������������������������� 16 Creating a New Page����������������������������������������������������������������������������� 17 Page Designer��������������������������������������������������������������������������������������� 19 Property Editor ������������������������������������������������������������������������������������� 23 Accessing Built-in Help������������������������������������������������������������������������� 25 Summary����������������������������������������������������������������������������������������������� 25 v ■ Contents ■Chapter ■ 3: Regions����������������������������������������������������������������������� 27 Creating and Deleting Regions�������������������������������������������������������������� 27 Type-Independent Region Properties���������������������������������������������������� 28 Identification and Source Sections������������������������������������������������������������������������� 30 Layout Section�������������������������������������������������������������������������������������������������������� 31 Grid Section������������������������������������������������������������������������������������������������������������ 34 Appearance Section������������������������������������������������������������������������������������������������ 36 Drag and Drop��������������������������������������������������������������������������������������� 37 Static Content Regions�������������������������������������������������������������������������� 40 Formatted vs Unformatted Text����������������������������������������������������������������������������� 41 Substitution Strings������������������������������������������������������������������������������������������������ 43 Referring to APEX pages����������������������������������������������������������������������������������������� 43 Referring to Local Images�������������������������������������������������������������������������������������� 44 Classic Report Regions������������������������������������������������������������������������� 46 Column-Specific Properties������������������������������������������������������������������������������������ 48 Report-Specific Properties������������������������������������������������������������������������������������� 56 Using the Source Query for Formatting������������������������������������������������������������������ 57 Chart Regions���������������������������������������������������������������������������������������� 58 Creating a Chart Region������������������������������������������������������������������������������������������ 60 A Chart’s Source Query������������������������������������������������������������������������������������������� 61 Chart-Specific Properties��������������������������������������������������������������������������������������� 61 Series-Specific Properties�������������������������������������������������������������������������������������� 63 Interactive Report Regions�������������������������������������������������������������������� 65 Using the Search Bar���������������������������������������������������������������������������������������������� 67 Configuring the Search Bar������������������������������������������������������������������������������������ 75 Link Column������������������������������������������������������������������������������������������������������������ 78 Summary����������������������������������������������������������������������������������������������� 80 vi ■ Contents ■Chapter ■ 4: Navigation������������������������������������������������������������������� 83 Lists������������������������������������������������������������������������������������������������������� 83 Viewing List Details������������������������������������������������������������������������������������������������ 84 Editing List Entries�������������������������������������������������������������������������������������������������� 85 Creating New List Entries��������������������������������������������������������������������������������������� 86 Creating a New List������������������������������������������������������������������������������������������������ 89 Modifying the Navigation Interface������������������������������������������������������� 90 Configuring the Navigation Menu��������������������������������������������������������������������������� 92 Configuring the Navigation Bar������������������������������������������������������������������������������� 93 List Regions������������������������������������������������������������������������������������������� 94 Hierarchical Lists����������������������������������������������������������������������������������� 97 Page Hierarchy������������������������������������������������������������������������������������ 101 Breadcrumbs��������������������������������������������������������������������������������������� 102 Breadcrumb Regions��������������������������������������������������������������������������� 105 Global Page����������������������������������������������������������������������������������������� 106 Summary��������������������������������������������������������������������������������������������� 107 ■Chapter ■ 5: Items and Buttons����������������������������������������������������� 109 Items��������������������������������������������������������������������������������������������������� 109 Item Sampler Page������������������������������������������������������������������������������ 109 Creating and Deleting Items���������������������������������������������������������������� 111 Positioning an Item������������������������������������������������������������������������������ 114 Text-Based Items��������������������������������������������������������������������������������� 117 Text Fields������������������������������������������������������������������������������������������������������������� 117 Number Fields������������������������������������������������������������������������������������������������������ 117 Password Items���������������������������������������������������������������������������������������������������� 118 Text Fields with Autocomplete������������������������������������������������������������������������������ 118 Color Pickers�������������������������������������������������������������������������������������������������������� 120 Date Pickers��������������������������������������������������������������������������������������������������������� 120 vii ■ Contents List-Based Items��������������������������������������������������������������������������������� 121 Dynamic List–Based Items����������������������������������������������������������������������������������� 122 Static List–Based Items���������������������������������������������������������������������������������������� 123 Properties for List–Based Items��������������������������������������������������������������������������� 124 Multi-Value List Items������������������������������������������������������������������������� 125 Yes/No Items��������������������������������������������������������������������������������������� 126 Display-Based Items��������������������������������������������������������������������������� 126 Initial Item Values�������������������������������������������������������������������������������� 126 Buttons������������������������������������������������������������������������������������������������ 128 Summary��������������������������������������������������������������������������������������������� 131 ■Chapter ■ 6: Session State������������������������������������������������������������ 133 Session IDs������������������������������������������������������������������������������������������ 133 Submit vs Redirect����������������������������������������������������������������������������� 134 Using an Item to Submit a Page���������������������������������������������������������� 135 Setting Session State During a Redirect��������������������������������������������� 136 Referring to a Session State Variable�������������������������������������������������� 137 Customized Reports���������������������������������������������������������������������������� 138 Filter by Job and Department Page���������������������������������������������������������������������� 138 Filter by Possible Department Page��������������������������������������������������������������������� 139 Filter by Salary Range Page��������������������������������������������������������������������������������� 141 Master-Detail Reports������������������������������������������������������������������������� 143 Chart Drill-Down���������������������������������������������������������������������������������� 146 Customized Titles and Labels�������������������������������������������������������������� 150 Cascading Lists����������������������������������������������������������������������������������� 152 Conditional Rendering������������������������������������������������������������������������� 155 Region Display Selectors��������������������������������������������������������������������� 157 Summary��������������������������������������������������������������������������������������������� 158 viii ■ Contents ■Chapter ■ 7: Processes������������������������������������������������������������������ 161 Stages of a Submit Action������������������������������������������������������������������� 161 PL/SQL Processes������������������������������������������������������������������������������� 163 PL/SQL to Access the Database���������������������������������������������������������� 166 Delete Employee Region��������������������������������������������������������������������������������������� 166 Insert Employee Region���������������������������������������������������������������������������������������� 167 Update Employee Region�������������������������������������������������������������������������������������� 168 PL/SQL to Compute Values������������������������������������������������������������������ 169 Local Variables������������������������������������������������������������������������������������������������������ 171 Comments������������������������������������������������������������������������������������������������������������ 172 Assignment Statements��������������������������������������������������������������������������������������� 172 Conditional Statements���������������������������������������������������������������������������������������� 172 Handling Multi-Row SQL Queries�������������������������������������������������������� 172 Concurrent Database Updates������������������������������������������������������������� 174 Lost Update Problem�������������������������������������������������������������������������������������������� 174 Transactions��������������������������������������������������������������������������������������������������������� 175 Avoiding Lost Updates������������������������������������������������������������������������������������������ 176 Using a Hash Function������������������������������������������������������������������������������������������ 178 Success and Error Messages�������������������������������������������������������������� 180 Conditional Processes������������������������������������������������������������������������� 181 Page Rendering Processes������������������������������������������������������������������ 183 Executing a Process Without a Submit����������������������������������������������������������������� 185 Report Mode vs Single-Record Mode������������������������������������������������������������������ 188 Implementing Previous and Next Buttons������������������������������������������������������������ 188 Report Data Entry�������������������������������������������������������������������������������� 191 Implementing the Report Region�������������������������������������������������������������������������� 193 Implementing the Insert Region��������������������������������������������������������������������������� 193 Implementing the Update/Delete Region�������������������������������������������������������������� 194 ix ■ Contents APEX Built-In Processes���������������������������������������������������������������������� 196 Automatic Row Fetch������������������������������������������������������������������������������������������� 197 Automatic Row Processing����������������������������������������������������������������������������������� 199 Clear Session State���������������������������������������������������������������������������������������������� 201 Form Pagination��������������������������������������������������������������������������������������������������� 202 Using the Built-In Processes��������������������������������������������������������������� 204 Employee Data Entry�������������������������������������������������������������������������������������������� 204 Sales Commissions���������������������������������������������������������������������������������������������� 205 Single Record View����������������������������������������������������������������������������������������������� 205 Report Data Entry������������������������������������������������������������������������������������������������� 206 APEX Built-in Form Pages������������������������������������������������������������������� 207 Form on a Table or View��������������������������������������������������������������������������������������� 208 Form on Table with Report������������������������������������������������������������������������������������ 212 Master-Detail Form����������������������������������������������������������������������������������������������� 213 Summary��������������������������������������������������������������������������������������������� 217 ■Chapter ■ 8: Data Validation���������������������������������������������������������� 219 Constraint Preservation����������������������������������������������������������������������� 219 Input Validation������������������������������������������������������������������������������������ 223 Process Validation������������������������������������������������������������������������������� 228 Summary��������������������������������������������������������������������������������������������� 230 ■Chapter ■ 9: Branches������������������������������������������������������������������� 231 Separating Input from Output�������������������������������������������������������������� 231 Creating a Branch�������������������������������������������������������������������������������� 234 Conditional Branching������������������������������������������������������������������������� 235 Wizard-Like Interfaces������������������������������������������������������������������������ 237 Implementing the Progress Bar���������������������������������������������������������������������������� 239 Basic Info Page����������������������������������������������������������������������������������������������������� 241 x ■ Contents Manager Info Page����������������������������������������������������������������������������������������������� 243 Hiredate Info Page������������������������������������������������������������������������������������������������ 243 Confirm Employee Info Page�������������������������������������������������������������������������������� 243 Summary��������������������������������������������������������������������������������������������� 245 ■Chapter ■ 10: Tabular Forms��������������������������������������������������������� 247 Creating a Tabular Form Region���������������������������������������������������������� 247 Accessing Values from a Tabular Form����������������������������������������������� 250 Updating the Database������������������������������������������������������������������������ 253 Validations������������������������������������������������������������������������������������������� 255 Built-in Tabular Form Processes��������������������������������������������������������� 256 Tabular Form Wizard��������������������������������������������������������������������������� 258 Summary��������������������������������������������������������������������������������������������� 262 ■Chapter ■ 11: Dynamic SQL����������������������������������������������������������� 263 Dynamic Reports��������������������������������������������������������������������������������� 263 Dynamic Processes����������������������������������������������������������������������������� 268 Combining Dynamic Reports and Processes��������������������������������������� 273 Summary��������������������������������������������������������������������������������������������� 277 ■Chapter ■ 12: Security������������������������������������������������������������������� 279 Authentication������������������������������������������������������������������������������������� 279 Managing Authentication Schemes���������������������������������������������������������������������� 280 Writing an Authentication Function���������������������������������������������������������������������� 282 Public Pages��������������������������������������������������������������������������������������������������������� 286 Authorization��������������������������������������������������������������������������������������� 287 Creating an Authorization Scheme����������������������������������������������������������������������� 287 Component Authorization������������������������������������������������������������������������������������� 288 Page Authorization������������������������������������������������������������������������������������������������ 290 Not Public User Scheme��������������������������������������������������������������������������������������� 292 xi ■ Contents Avoiding Malicious Use����������������������������������������������������������������������� 292 SQL Injection��������������������������������������������������������������������������������������������������������� 292 Cross-Site Scripting���������������������������������������������������������������������������������������������� 299 URL Modification�������������������������������������������������������������������������������������������������� 305 Summary��������������������������������������������������������������������������������������������� 313 Index���������������������������������������������������������������������������������������������� 315 xii About the Author Edward Sciore is an associate professor in the computer science department at Boston College He has been teaching college students for more than 35 years His research specialty is database systems, and he thoroughly enjoys teaching the wonders of database technology to captive students xiii About the Technical Reviewer Darl Kuhn is a DBA/developer working for Oracle He teaches Oracle classes at Regis University in Denver, Colorado, and is an active member of the Rocky Mountain Oracle Users Group Darl enjoys sharing knowledge, and it has led to several book projects over the years xv Acknowledgments First and foremost, I would like to thank the APEX user community Numerous people routinely and generously share their APEX knowledge by writing blogs, creating demonstration APEX sites, and answering all kinds of questions on the APEX web forums I learned much from them This book is my attempt to give something back I also want to thank my Apress editors, Jonathan Gennick and Jill Balzano Jonathan convinced me to write the book, and provided guidance and encouragement every step of the way Jill was always supportive, and smoothed out the inevitable bumps in the road I also want to acknowledge the support of my two children, Leah and Aaron Aaron’s name can also be found somewhere in Chapter 10 Most importantly, I want to acknowledge my wife Amy She listened to my ideas, helped me resolve technical issues, worked through the APEX examples, and pointed out passages in the book that needed clarification She was a relentless proofreader I could have written the book without her, but it would not have been anywhere near as good Thanks xvii ... version of the application by going to the URL apex .oracle. com/pls /apex/ f?p=87 059 :1 You can also download the source code for the application from the Apress web site Unlike demo applications in... identify the APEX server, followed by the application ID and page ID For example, the URL for my Employee Demo home page is   http:/ /apex .oracle. com/pls /apex/ f?p=87 059 :1   16 Chapter ■ Applications... APEX application hosted by the apex .oracle. com server The characters following the equals sign are the application ID and page ID, separated by a colon If you omit the page ID from the URL, APEX

Ngày đăng: 15/08/2018, 09:42

Từ khóa liên quan

Mục lục

  • Contents at a Glance

  • Contents

  • About the Author

  • About the Technical Reviewer

  • Acknowledgments

  • Introduction

  • Chapter 1: The SQL Workshop

    • Object Browser

    • SQL Command Tool

    • Summary

    • Chapter 2: Applications and Pages

      • Creating an Application

      • Editing Application Properties

      • Deleting an Application

      • Running an Application Page

        • Running a Page from within APEX

        • Running a Page from Outside of APEX

        • Creating a New Page

        • Page Designer

        • Property Editor

        • Accessing Built-in Help

        • Summary

        • Chapter 3: Regions

          • Creating and Deleting Regions

Tài liệu cùng người dùng

Tài liệu liên quan