24 Copyright © 2004, Oracle. All rights reserved. Using WebUtil to Interact with the Client.

Slides:



Advertisements
Similar presentations
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
Advertisements

17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
18 Copyright © Oracle Corporation, All rights reserved. Transporting Data Between Databases.
Copyright  Oracle Corporation, All rights reserved. 1 Creating an Application: The AppBuilder for Java IDE.
5 Copyright © Oracle Corporation, All rights reserved. Using Data Dictionary and Dynamic Performance Views.
Copyright Ó Oracle Corporation, All rights reserved Sharing Objects and Code.
13 Copyright © 2004, Oracle. All rights reserved. Introduction to Triggers.
 2002 Prentice Hall. All rights reserved. Chapter 2 - Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Overview of the Visual Studio.NET.
10 Copyright © 2004, Oracle. All rights reserved. Creating Noninput Items.
A Guide to Oracle9i1 Creating an Integrated Database Application Chapter 8.
A Guide to Oracle9i1 Advanced SQL And PL/SQL Topics Chapter 9.
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Eyad Alshareef 1 Creating Custom Forms Part A. 2Eyad Alshareef Data Block and Custom Forms Data block form Data block form Based on data blocks that are.
14 Copyright © 2004, Oracle. All rights reserved. Producing Triggers.
Copyright  Oracle Corporation, All rights reserved. 4 Creating Functions.
23 Copyright © 2004, Oracle. All rights reserved. Sharing Objects and Code.
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
Benefits of PL/SQL. 2 home back first prev next last What Will I Learn? In this lesson, you will learn to: –List and explain the benefits of PL/SQL –List.
1 Copyright © 2004, Oracle. All rights reserved. Introduction to Oracle Forms Developer and Oracle Forms Services.
Forms - An Overview of Oracle Form Builder v.6.0 Abhishek Parag Prashant Arun.
Adding User Interactivity – Lesson 51 Adding User Interactivity Lesson 5.
1 1 Lab1 Ismail M. Romi – IT Dept, PPU, Visual Basic 2005 Programming Tour.
Copyright Ó Oracle Corporation, All rights reserved. 1 Introduction to Oracle Developer.
The Power of WebUtilSeite 1 The Power of WebUtil Gerd Volberg, OPITZ CONSULTING.
I Copyright © 2004, Oracle. All rights reserved. Introduction Copyright © 2004, Oracle. All rights reserved.
11 Copyright س Oracle Corporation, All rights reserved. ® Overview of PL/SQL.
1 Copyright © 2004, Oracle. All rights reserved. Introduction to PL/SQL.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
1 Chapter 12: Form Builder Objects and Flexible Code.
1 Copyright © 2004, Oracle. All rights reserved. Introduction to PL/SQL.
12 Copyright © 2004, Oracle. All rights reserved. Understanding and Influencing the PL/SQL Compiler.
Copyright Ó Oracle Corporation, All rights reserved Producing Triggers.
Copyright Ó Oracle Corporation, All rights reserved Working with Other Canvases.
3 Copyright © 2004, Oracle. All rights reserved. Controlling Access to the Oracle Listener.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
16 Copyright © 2004, Oracle. All rights reserved. Adding Functionality to Items.
Copyright Ó Oracle Corporation, All rights reserved Query Triggers.
Chapter Eleven The X Window System. 2 Lesson A Starting and Navigating an X Window System.
Oracle Forms Oracle Forms Builder provides various tools, which have powerful Graphical User Interfaces (GUI's) to design such forms. All objects, properties,
4 Copyright © 2004, Oracle. All rights reserved. Creating a Basic Form Module.
25 Copyright © 2004, Oracle. All rights reserved. Introducing Multiple Form Applications.
Copyright Ó Oracle Corporation, All rights reserved Writing Flexible Code.
17 Copyright © 2004, Oracle. All rights reserved. Deploying an ADF Application.
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Oracle World # Web Forms: The Great Leap Forward A P Clarke.
MTA EXAM HTML5 Application Development Fundamentals.
Copyright Ó Oracle Corporation, All rights reserved Debugging Triggers.
15 Copyright © 2004, Oracle. All rights reserved. Debugging Triggers.
10 Copyright © 2004, Oracle..All rights reserved. PL/SQL.
I Copyright © 2007, Oracle. All rights reserved. Introduction.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
22 Copyright © 2009, Oracle. All rights reserved. Filtering Requests in Oracle Business Intelligence Answers.
2 Copyright © 2004, Oracle. All rights reserved. Running a Forms Developer Application.
2 Copyright © 2006, Oracle. All rights reserved. Running a Forms Developer Application.
4 Copyright © 2004, Oracle. All rights reserved. Advanced Interface Methods.
E Copyright © 2006, Oracle. All rights reserved. Using SQL Developer.
12 Copyright © 2004, Oracle. All rights reserved. Application Migration: Overview.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
16 Copyright © 2004, Oracle. All rights reserved. Building ADF UIX View Components.
Running a Forms Developer Application
Forms Concepts Triggers Fired when Internal/External events occur
Working in the Forms Developer Environment
Working in the Form Builder Environment
Introduction to Triggers
Lecture on Oracle Forms
Using JDeveloper.
Chapter 8: Creating An Integrated Database Application
MATERI PL/SQL Procedures Functions Packages Database Triggers
Presentation transcript:

24 Copyright © 2004, Oracle. All rights reserved. Using WebUtil to Interact with the Client

24-2 Copyright © 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe the benefits of the WebUtil utility Integrate WebUtil into a form Use WebUtil to interact with a client machine

24-3 Copyright © 2004, Oracle. All rights reserved. WebUtil Overview WebUtil is a utility that: Enables you to provide client-side functionality on Win32 clients Consists of: –Java classes –Forms objects –PL/SQL library Forms built-Ins WebUtil built-Ins

24-4 Copyright © 2004, Oracle. All rights reserved. Benefits of the WebUtil Utility Why use WebUtil? Developer has only to code in PL/SQL (no Java knowledge required) Free download (part of Forms 10g in a patch set) Easy to integrate into a Forms application Extensible WebUtil provides: –Client-server parity APIs –Client-server added value functions –Public functions –Utility functions –Internal functions

24-5 Copyright © 2004, Oracle. All rights reserved.

24-6 Copyright © 2004, Oracle. All rights reserved.

24-7 Copyright © 2004, Oracle. All rights reserved.

24-8 Copyright © 2004, Oracle. All rights reserved.

24-9 Copyright © 2004, Oracle. All rights reserved.

24-10 Copyright © 2004, Oracle. All rights reserved.

24-11 Copyright © 2004, Oracle. All rights reserved. Integrating WebUtil into a Form Library Step 1: Attach the WEBUTIL library.

24-12 Copyright © 2004, Oracle. All rights reserved. Integrating WebUtil into a Form Object Library Object group Alert Items Canvas Window Step 2: Subclass the WEBUTIL object group.

24-13 Copyright © 2004, Oracle. All rights reserved. When to Use WebUtil Functionality Pre-Form When-New-Form-Instance When-New-Block-Instance (first block) Form starts JavaBeans are instantiated Any trigger after form starts and while form is running

24-14 Copyright © 2004, Oracle. All rights reserved. Interacting with the Client Forms Built-Ins / Packages HOST GET_FILE_NAME READ_IMAGE_FILE WRITE_IMAGE_FILE OLE2 TEXT_IO TOOL_ENV WebUtil Equivalents CLIENT_HOST CLIENT_GET_FILE_NAME CLIENT_IMAGE.READ (WRITE)_IMAGE_FILE CLIENT_OLE2 CLIENT_TEXT_IO CLIENT_TOOL_ENV

24-15 Copyright © 2004, Oracle. All rights reserved. Example: Opening a File Dialog on the Client DECLARE v_file VARCHAR2(250):= CLIENT_GET_FILE_NAME('','', 'Gif Files|*.gif|JPEG Files|*.jpg|', 'Select a photo to upload',open_file,TRUE);

24-16 Copyright © 2004, Oracle. All rights reserved. Example: Reading an Image File into Forms from the Client DECLARE v_file VARCHAR2(250):= CLIENT_GET_FILE_NAME('','', 'Gif Files|*.gif|JPEG Files|*.jpg|', 'Select a photo to upload',open_file,TRUE); it_image_id ITEM := FIND_ITEM ('employee_photos.photo'); BEGIN CLIENT_IMAGE.READ_IMAGE_FILE(v_file,'',it_image_id); END;

24-17 Copyright © 2004, Oracle. All rights reserved. Example: Writing Text Files on the Client DECLARE v_dir VARCHAR2(250) := 'c:\temp'; ft_tempfile CLIENT_TEXT_IO.FILE_TYPE; begin ft_tempfile := CLIENT_TEXT_IO.FOPEN(v_dir || '\tempdir.bat','w'); CLIENT_TEXT_IO.PUT_LINE(ft_tempfile,'dir ' || v_dir || '> '|| v_dir || '\mydir.txt'); CLIENT_TEXT_IO.PUT_LINE(ft_tempfile, 'notepad ' || v_dir || '\mydir.txt'); CLIENT_TEXT_IO.PUT_LINE(ft_tempfile,'del '|| v_dir || '\mydir.*'); CLIENT_TEXT_IO.FCLOSE(ft_tempfile); CLIENT_HOST('cmd /c ' || v_dir || '\tempdir'); END;

24-18 Copyright © 2004, Oracle. All rights reserved. DECLARE v_dir VARCHAR2(250) := 'c:\temp'; ft_tempfile CLIENT_TEXT_IO.FILE_TYPE; begin ft_tempfile := CLIENT_TEXT_IO.FOPEN(v_dir || '\tempdir.bat','w'); CLIENT_TEXT_IO.PUT_LINE(ft_tempfile,'dir ' || v_dir || '> '|| v_dir || '\mydir.txt'); CLIENT_TEXT_IO.PUT_LINE(ft_tempfile, 'notepad ' || v_dir || '\mydir.txt'); CLIENT_TEXT_IO.PUT_LINE(ft_tempfile,'del '|| v_dir || '\mydir.*'); CLIENT_TEXT_IO.FCLOSE(ft_tempfile); CLIENT_HOST('cmd /c ' || v_dir || '\tempdir'); END; Example: Executing Operating System Commands on the Client

24-19 Copyright © 2004, Oracle. All rights reserved. Example: Performing OLE Automation on the Client CLIENT_OLE2.OBJ_TYPE CLIENT_OLE2.LIST_TYPE CLIENT_OLE2.CREATE_OBJ CLIENT_OLE2.SET _PROPERTY CLIENT_OLE2.GET_OBJ _PROPERTY CLIENT_OLE2.INVOKE_OBJ CLIENT_OLE2.CREATE _ARGLIST CLIENT_OLE2.ADD_ARG CLIENT_OLE2.INVOKE CLIENT_OLE2.DESTROY _ARGLIST CLIENT_OLE2.RELEASE_OBJ You can use the following for OLE automation:

24-20 Copyright © 2004, Oracle. All rights reserved.

24-21 Copyright © 2004, Oracle. All rights reserved.

24-22 Copyright © 2004, Oracle. All rights reserved. Example: Obtaining Environment Information about the Client CLIENT_TOOL_ENV.GETVAR(:control.env_var, :control.env_value);

24-23 Copyright © 2004, Oracle. All rights reserved. Summary In this lesson, you should have learned that: WebUtil is a free extensible utility that enables you to interact with the client machine Although WebUtil uses Java classes, you code in PL/SQL You integrate WebUtil into a form by attaching its PL/SQL library and using an object group from its object library; then you can use its functions after the form has started and while it is running With WebUtil, you can do the following on the client machine: open a file dialog box, read and write image or text files, execute operating system commands, perform OLE automation, and obtain information about the client machine

24-24 Copyright © 2004, Oracle. All rights reserved. Practice 24 Overview This practice covers the following topics: Integrating WebUtil with a form Using WebUtil functions to: –Open a file dialog box on the client –Read an image file from the client into the form –Obtain the value of a client environment variable –Create a file on the client –Open the file on the client with Notepad –Use OLE automation to create a form letter on the client

24-25 Copyright © 2004, Oracle. All rights reserved.

24-26 Copyright © 2004, Oracle. All rights reserved.