This document provides the details for running the WebUtil Demo. The purpose of this demo is to show many of the features of Webutil. For more details on WebUtil please see the WebUtil launch page on the Forms OTN page.
Its is assumed that you have a working install of WebUtil. For details on how to set up WebUtil please see the WebUtil Familiarization Manual available as part of the WebUtil download or on the WebUtil launch page on the Forms OTN page. You should also have a database connection and have run the appropriate database scripts if you wish to upload or download from/to the database.
This demo comprises of 3 main files: An FMB (which is the Forms demo), a DLL (used as part of the C API demo) and a readme file (this file). This demo has been written specifically against the 1.0.6 Production of WebUtil and terms and conditions are outlined here.
As mentioned above, the full documentation for setting up WebUtil is available in the WebUtil manual. However, in the context of this demo you need to do some minor configuration steps.
The demo exists of a simple form containing a number of tabs. Each tab exercises different areas of WebUtil
Client Info will display information about the client machine; including Host Name, User Name, IP Address to name a few. Press the Get Client Info button to populate the fields.
BuiltIns will exercise functions to show a file selection dialog, read a client side image file, display the NLS settings and to use client side Text_IO to write data out to a file.
Click the ... button to select a GIF file from the client machine hard drive and then press Read Image to load the image form the client and display in the image field.
Click the NLS_LANG button to read the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE NLS setting from client registry. Note that this call is a direct mapping to the client/server version. If you need to read the NLS LANG you should consider another function call since you would probably not have an Oracle registry branch installed on the client machine.
Write some text into the field at the bottom of the screen and press the Write button to write the file to the client side user.home\helloworld.txt file.
The Files test will exercise many of the WebUtil features for file manipulation.
Pressing List Root Directories will display a list of the all the current root directories on the client machine.
Pressing Files in user.home will display the files in this directory. Note that the directory name is displayed at the top of the page.
Pressing Copy File will copy a file called helloworld.txt in user.home to user.home\copy of helloworld.txt. Note that this file is created when you perform the Write test in the Builtins tab. If the file exists, the list of files in user.home will show the new file. If the file does not exists a message will displayed saying the copy failed.
Pressing Delete File will delete a file user.home\copy of helloworld.txt. Note that this file is created when you perform a successful Copy File as indicated above. If the file exists, it is deleted and removed from the list of files. If the delete fails a message is displayed.
Pressing File Open will display a file selection dialog. Selecting a file and pressing Open will display the filename in the Results field.
Pressing File Save will display a file save dialog. Selecting a file and pressing Save will display the filename in the Results field.
Pressing Info on user.home\helloworld.txt will display file information on the helloworld.txt file, including its size, and whether it is readable or writable.
The OLE test will perform some simple client side OLE manipulation. Enter some text in the main text area and select a filename by pressing the ... button. Now press the Write to Word button and WebUtil will write the text out to a file on the client machine as a Word document.
The Upload test shows how you can upload a file from the client machine to the application server or the database.
First of all select a client side file by pressing the ... button. Once the file has been selected press the Upload to DB button. This will upload the selected file to the database in a table called WU_TEST_TABLE, column name BLOB and an ID of 1.
Ensure that you have selected a client side file by pressing the ... button. Once the file has been selected press the Upload to AS button. This will upload the selected file to d:\temp\<filename> on the application server.
Download will demonstrate how you can download a file from the application server or the database, onto the client machine.
First of all select a filename by pressing the ... button. This will define the client filename to which the file is download from the database. Now press the Download from DB button. This will download a file from the WU_TEST_TABLE onto the client machine.
Ensure that a filename has been selected by pressing the ... button. This will define the client filename to which the file is downloaded from the application sever. Now press the Download from AS button. This will download a file called d:\temp\downloaded_from_as.txt from the application server on the client.
Selecting the Browser tag will allow you to test various features of WebUtil related to the browser.
Pressing the Set Browser Message button will display information on the browser status line.
The Set Separate Frame Title button is only available when the HTML parameter <separateFrame> is set to true. This will change the title of the separate window frame.
Press this button to display various parameters from the browser's applet tag. This current demo will show the values for <lookAndFeel>, <colorScheme>, <separateFrame> and applet width and height.
Note also, that when you exit the demo, you will be redirected to the Forms OTN page. This is again showing a feature of the WebUtil.
The Host test will use Notepad on the client machine to show how client side Host commands can be run using WebUtil. This test includes a number of options. You can define that when Notepad is run it will open a file. Do this by checking the Ask for Filename checkbox. You can also define how the host command is run by checking one of the radio buttons. You can either run Notepad and block the processing of the current form; run Notepad and still allow access to the current form; or you can run notepad without blocking the form and also call a trigger when Notepad is closed. Choosing the final option will display a message on the Forms status line.
Press the Host to Notepad button to the run the test.
The C API test shows how you can execute a client side DLL from a form using WebUtil. This test comprises of a DLL which WebUtil automatically downloads to the client and the code is executed on the client machine and the results passed back to Forms. Press the Call C API button. If run successfully, the form will display an alert with the message "The New value for String is: A Fixed string from within the C Program". Pressing OK will then display a message "New Length 40".
This test shows that a string passed to the C program on the client is being changed by the C program. The form is then displaying the new message and the length of the message.
This tab will display information about WebUtil.