WEBUTIL_FILE.FILE_OPEN_DIALOG

I've been trying to use this function such that it goes to the last directory used but I'm not having much luck. I tried using a global and ,in the example below, a variable but neither works. The variable has the correct directory when displayed using set_alert_text immediately before the call. Can anyone help?
Here's my code,
DECLARE
     alert_button NUMBER;
     l_directory PAYROLL_FILE_HEADER.FILENAME%TYPE;
BEGIN     
l_directory := :GLOBAL.directory;
          set_alert_text( 'PAYROLL_INTERFACE_ERROR_ALERT'
     , l_directory
     , alert_button);
:FILE_VALIDATION.INPUT_FILE_NAME := WEBUTIL_FILE.FILE_OPEN_DIALOG(l_directory, '', '|All files|*.*|', 'Select Payroll Data File');
:FILE_VALIDATION.File_Name := '';
:FILE_VALIDATION.File_Directory := '';
:FILE_VALIDATION.Number_Of_Records := '';
:FILE_VALIDATION.File_Details := '';
GO_ITEM('FILE_VALIDATION.CONFIRM_BUTTON');
SET_ITEM_PROPERTY('FILE_VALIDATION.CONFIRM_BUTTON', ENABLED, PROPERTY_TRUE);
END;

I have also tried...
:block.rute := webutil_file.file_selection_dialog(directory_name => 'c:\',
file_name => null,
file_filter => 'Documentos pdf|*.pdf',
title => 'Seleccione Fichero',
dialog_type => open_file, --save_file
select_file => TRUE);
... without any success of the PDF showing after selecting the file and pressing Open button of the selection diaglog.

Similar Messages

  • WebUtil_File.File_Open_Dialog VERY SLOW with large amounts of files

    Dear Friend,
    We are using WebUtil_File.File_Open_Dialog on the client to allow for the selection of an image from a folder on the server, which contains around 2-3000 files.
    It takes around 10-15 minutes to display the files within the folder. This is obviously unacceptable and I was wondering if anyone had come up with a viable solution to this problem, as i noticed similar issues had been posted in the past and no solution was suggested.
    The function call for the above operation is: :control.fichier := WebUtil_File.File_Open_Dialog(:global.path||'images\bdsurvey\', '', '*.jpg |*.jpg| (All files)*.* |*.*|', 'Nom du fichier photo');
    Many thanks,
    John

    This can be done by the following:
    Tuning the file system - reducing/filtering unwanted files, defragmentation, FAT (NTFS might consume more time)
    I am not sure whether you can do anything for this in AS.
    Alternatively there are some java classes which may be used instead of web util.

  • Webutil: webutil_file.file_open_dialog seems to hang when cancel is pressed

    Hi,
    I just used webutil_file.file_open_dialog to select files. I noticed when I press the cancel button, webforms hangs. I have to close my webforms session with the taskmanager, while the cpu has gone to 99%
    I encounter the same problem when using webutil_file.file_selection_dialog.
    Am I doing something wrong or is this a bug?

    what was the code problem that you resolved - I am running into the exact same problem when using the webutil_file.file_open_dialog and I hit cancel it all hangs.

  • WEBUTIL_FILE.FILE_OPEN_DIALOG do not always work

    I'm trying to open a file with WEBUTIL_FILE.FILE_OPEN_DIALOG. The dialog shows but when I select a file, it does not alway open. I'd say it opens once out of 10 times. Also, it never opens a file if I double-click on it. I've also tried CLIENT_GET_FILE_NAME but with the same results.

    Ensure that you are using Forms and WebUtil version 10.1.2.2 or newer and Jinit 1.3.1.28 or newer. If you are using the Sun JRE, I would recommend 1.5.0_15.
    WebUtil 10.1.2.2 (or 10.1.2.3) can be obtained from a Developer Suite installation of the same version. For Application Server, simply copy the 10.1.2.2 (or 10.1.2.3) frmwebutil.jar file from Dev Suite to the Application Server home, replacing the old file.

  • Buttons 'LIST' AND 'DETAILS' disabled in WEBUTIL_FILE.FILE_OPEN_DIALOG

    When I do 'WEBUTIL_FILE.FILE_OPEN_DIALOG' the explorer is opened and it shows some bittons ('List','Details',etc).
    My problem is that the buttons 'List' and 'Details' are disabled and I need to use them.
    And a question ¿could I hide any of the icons in the explorer?
    Sorry for my English
    Thank you

    Did you find out how to fix it? I need it, too, but looks like no one have answer. Please let me know if you know.
    Thanks,
    Jess

  • Webutil: webutil_file.file_open_dialog with filter doesn't work as expected

    Hi
    I just tried to open files by using webutil_file.file_open_dialog. Since I only want to select files with the prefix "brp" (e.g. brp0001.txt, brp0002.lis), I fill the parameter file_filter with the value: brp*.*
    This doesn't work. The dialog only shows folders, but not the brp*.* files. I tried with switching to capitals, which doesn't solve anything. With the filter set to *.* the dialog shows all folders and files, so that seems to work ok.
    Is anyone aware of this problem and know a solution? I'm using webutil 1.0.2 (beta).

    K..here's some logging. As far as I can see it's all normal, but it doesn't work (no matter if I use a last | or not). Should be easy to reproduce.
    2003-okt-29 09:42:44.547 WUF[setProperty()] Setting property WUF_GFN_DIRNAME to y:\data\
    2003-okt-29 09:42:44.567 WUF[setProperty()] Setting property WUF_FILENAME to false
    2003-okt-29 09:42:44.567 WUF[setProperty()] Setting property WUF_FILTER to (brp_archief*.*)|brp_archief*.*
    2003-okt-29 09:42:44.587 WUF[setProperty()] Setting property WUF_GFN_MESSAGE to bestandsnaam selecteren
    2003-okt-29 09:42:44.597 WUF[setProperty()] Setting property WUF_GFN_MULTISELECT to FALSE
    2003-okt-29 09:42:44.608 WUF[getProperty()] Getting property WUF_GFN_OPENFILE
    2003-okt-29 09:42:45.679 WUF[gfnDialog()] Creating Custom File Filter : Mask=brp_archief*.*, Label=(brp_archief*.*)
    2003-okt-29 09:42:45.679 WUF[gfnDialog()] Open File mode
    2003-okt-29 09:45:27.203 WUF[getProperty()] Value of WUF_GFN_OPENFILE=

  • WEBUTIL_FILE.FILE_OPEN_DIALOG look and feel

    Hello all,
    We just implemented webutil on our 10g environment to facilitate with the upload + download of files via our forms.
    To my horror, users are complaining about the look and feel of the file manipulation dialogs. I fully recognise that this is a java based screen, but was wondering is it possible to configure the look and feel to a more Microsoft way! (euch!)
    Many Thanks,
    John Lynagh
    Edited by: user6400347 on 24-Sep-2008 08:21

    Hello,
    You are right to say that the LAF directly depends on the underlying Java runtime. JIintiator is JRE 1.3 based, so you have the look that comes with.
    Two possible solutions would be:
    1- replace the JInitiator by the Sun Java plug-in
    2- write a nice Javabean to replace the file selection dialog.
    Francois

  • Forms is not cooperating at all!!

    ok so idk maybe I'm just not intelligent enough to understand Forms but I have read through various Documentation on Forms 11g and done research on it and I have typed stuff exactly how I read about to put it and nothing seems to be working like it is supposed to.
    I am working on making a page that can upload and download a PDF from the client's computer to the Database and back by use of buttons. The upload page has a browse button that is supposed to bring up an open dialog box using webutil and then when the user selects a file the file path of that file will be placed into a text box so that 1. they can verify that it is correct and 2. to store the file path for later. Then the user clicks the upload button and the button is supposed to pull the file path from the text item and store the file located in that location into the database.
    here is the code for each of the buttons.
    browse button:
    DECLARE
         File_Path VARCHAR2(255);
    BEGIN
         FILE_PATH := WEBUTIL_FILE.FILE_OPEN_DIALOG
              C,
              null,
              '*.pdf'
         :block.file_upload_text := FILE_PATH;
         Synchronize;
         END;
    upload button:
    Declare
         Result_Upload BOOLEAN;
    Begin
         Result_Upload := Webutil_File_Transfer.Client_To_DB
              :block.file_upload_text,
              'file_tbl',
              'file'
    End;
    and the text box is in the data blocks drop down under buttons it was put there automatically by Forms. But when I try to compile it I get an Error 49 bad bind variable 'block.file_upload_text'
    the text item name is spelled correctly and everything I have found online says that is how to access the text in a text item I dont understand what is gong on that it isnt working and I am really getting annoyed at Forms because no matter how much I read about it and how much of the little of what is available that I look at I can not figure out what is wrong.
    Another problem I am having is that before you even get to this upload page there is another page and that page has a button that is supposed to pull up the upload page and I have figured out enough to figure out that I need the upload page canvas to be a data block in order to call it and then you use a go_block or something like that to pull it up but what I can't figure out is how to make that canvas into a data block... everything that I am finding is saying that to create a data block you need to call a table and stuff and I dont know how I am supposed to put that canvas into a table in the database so that I can create a data block with that canvas in it. I even found something that is supposed to walk you through how to do it and I got to like step 4 of 6 and it said to do something to do with double clicking the database node button or something and I looked everywhere and didn't find anything that said anything about database node. I have been working on this for about a month and a half now and it feels like I have gotten nowhere on it I still haven't even gotten to the download part at all.
    I got this same program working completely upload and download in Java in 2 weeks then found out we needed it to work with Forms so I found out I needed it to be a java bean not just java so I tried to figure that out, couldn't seem to figure out how a java bean worked with what I was trying to do and the only documentation I was able to find that might have been helpful for it was on a blog which are blocked from my work computer and I was informed that Forms had something built in that did exactly what I needed, well that hasn't helped much either so far... I could really use some detailed absolutely as dumbed down as possible help here because I really need to get this thing done.
    I know I rambled a little and I am sorry, any help that can be provided will be greatly appreciated!!

    Sorry for feeling uncomfortable with Forms. But your, I think there is a lot of room fpr (re-)reading forms documentation and other educational handouts.
    I won't solve yout problems, but may be I can give you few hints, tht came into my mind, when browsing yout post:
    DECLARE
    File_Path VARCHAR2(255);
    BEGIN
    FILE_PATH := WEBUTIL_FILE.FILE_OPEN_DIALOG( C, null, '*.pdf')
    +:block.file_upload_text := FILE_PATH;+
    Synchronize;
    END;
    1. What is C? You should get a compilation error since iot is nor declared.
    2. Do you need a directory ot a file. If the first take FILE_SELECTION_DIALOG into consideration. Or may ist easier for you to use CLIENT_GET_FILE_NAME. For this function don't miss to set FILE_SELECT-Parameter to FALSE.
    3. Are you sure the block, where the item FILE_UPDLOAD_TEXT is in is named BLOCK. Forms automatic naming will generate something like BLOCKn (where n is a number). But may be you have renamed the Block (what is common use).
    4. Declaration of file_path is not really necessary; you may assigne the result of the Function immediately to your forms item (via bind variable :<block_name>.<item_name>)
    5. Synchronize is not neccessary at this point, just costs a round-trip ofr the AS.
    (6. I'm an fan of PL/SQLs named parameter syntax; it make code easier to read and to maintaine. So your function call would read
    WEBUTIL_FILE.FILE_OPEN_DIALOG( directory_name => c, file_name => NULL, ...
    just a suggestion, fell free to uswr or not)
    The following is hard to understand. Probably you have a complete different understandind of how to program. You have to accept it's oracle forms an not sonething. That means there are certain structures:
    1. Data
    1 Form consits of one or several blocks; some of them may be connect to the database, often to a table, but it need not be a table; these are called database blocks, others (no database connect) are often called control block (but might also hold data).
    1 Block consists of one or several items; some of them hold data in form of text, numbers, date, image, lists, radios ...; others are means to control the application, e.g. buttons.
    2. View
    1 Form consists of one or several windows.
    1 Window contains one or more canvases; at least one content canvas; there are also other types, but I think you don't need them.
    On the the canvases you "paint" all the things you want to sho to your users, your items (you have to make an item visible and assigne a canvas in the canvas property), free text, graphic elements.
    You don't program a "page"! Your application is running within an applet within a page.
    3. Logic
    You may assigne logic via triggers to the elements of the data stack (form, block, item), not the view stack.
    You may put logic into procedures and functions for better readability and maintainance; these can be stored locally in the form or in own libraries for re-use in other forms.
    What trigger to use in which situation? That beyond my post.
    A special topic here: you can extend forms functionality with java beans. You have to extend forms functionalty with java beans, if you need to get our of the applet sand box. You need that because you want to read/write information of your local client. Basic Java beans you find in WEBUTIL. It offers, I am sure, all the functionality you need. And you have found them.
    So to get your problem solved of showing the whole stuff after pressing a button there a several possibilities:
    easiest: create 2nd content canvas and put your items there; at the switching button issue GO_BLOCK('<block_name>') OR GO_ITEM('<block_name>.<item_name>'), where block_name is that thing that makes the compilation trouble.
    bit mor an effort: create an own window with a new content canvas; the rest as described above; get some knowledge about SET_WINDOW_PROPERTY, espacially in cinjunction with the property VISIBLE, you will need it, whenn switching back;
    even more effort: create an new forms + .... and call this form on the swithing button.
    This might be a reasonable way if you want to re-use this function (up-/down-loading) from several forms.
    Last sentence, in java it took 2 weeks?in forms, Iwould say it's a task for 2-4 hours (forms and webutil correctly installed nd configured). But I won't tell your boss.

  • Load Image in Forms 10g

    Dear All
    I want to load image from hard Disk to data base in forms 10g.
    I have a Image item and Browse button in my forms and in database it is a BLOB column.
    I need when i click on Browse Button then it will open the browse window and you can select on that.
    How to do ? Urgent , please help me .
    Thank you.

    or
    try this.
    declare
    l_file_name varchar2(383);
    begin
    l_file_name := webutil_file.file_open_dialog( );
    if
      l_file_name is not null
    then
      if
        :block.rowid is not null
      then
        create_record;
      end if;
      client_image.read_image_file ( l_file_name, substr ( l_file_name, instr ( l_file_name , -1 ) ), 'images.images' );
    end if;
    end;Note:- u have to attach webutil.pll without library it will not work.
    Sarah

  • How to import data from CSV file into a table by using oracle forms

    Hi,
    I have a CSV file and i want to insert in oracle database in a table by using a button in oracle forms.
    the user can select CSV file by using open dialog .
    can any one help me to find method to make import and select file from the client machine ?
    thx.

    1. create table blob
    CREATE TABLE IB_LOVE
      DOC          BLOB,
      CONTRACT_NO  VARCHAR2(20 BYTE)                NOT NULL
    )2. use the code below to insert:
           INSERT INTO ordmgmt.ib_love
                       (contract_no, doc
                VALUES (:control.contract_no_input, NULL
           lb$result :=
             webutil_file_transfer.client_to_db (:b2.file_name, v_file_blob_name, v_col_blob_name,
                                                 'CONTRACT_NO = ' || :control.contract_no_input);
           :SYSTEM.message_level := 25;
           COMMIT;
           :SYSTEM.message_level := 0;3. use the code below to download
         if :control.CONTRACT_NO_INPUT is not null then
              vboolean :=   webutil_file_transfer.DB_To_Client_With_Progress(
                               vfilename,  --filename                       
                              'IB_LOVE', ---table of Blob item                       
                              'DOC',  --Blob column name                       
                              'CONTRACT_NO = ' || :CONTROL.CONTRACT_NO_INPUT, ---where clause to retrieve the record                       
                              'Downloading from Database', --Progress Bar title                       
                              'Wait to Complete'); --Progress bar subtitle  client_host('cmd /c start '||vfilename);
              client_host('cmd /c start '||vfilename);                 
         else
              errmsg('Please choose contract no');
         end if;4. use the code below to open file dialog
    x:= WEBUTIL_FILE.FILE_OPEN_DIALOG ( 'c:\', '*.gif', '|*.gif|*.gif|', 'My Open Window' ) ;
    :b2.FILE_NAME:=X;

  • Open bat file on client machine using webutil

    Hi all.
    I'm on devsuite 10g.
    I want to run a bat file on client machine using client_host function of webutil.
    I have tried first to execute the bat file with mouse double-click in order to check if it is ok, and it works.
    Now I want to execute this file from my form using webutil.
    Here is my code:
    --> with this code I select a file from client machine
    Declare
         LC$Fichier Varchar2(1000):=null ;
         PC$Filtre Varchar2(2000) := '|All files|*.*|' ;
    Begin
         LC$Fichier := WEBUTIL_FILE.FILE_OPEN_DIALOG
         null,
         PC$Filtre,
         'Seleziona un file da caricare'
    If LC$Fichier is not null Then
    :output.apri_file := LC$Fichier ;
    End if ;
    End ;
    --> with this code I execute the file that I have opened
    declare
         cmd varchar2(30000) := null;
    BEGIN
         Cmd := 'cmd /c start "" "' || :output.apri_file || '"' ;
    CLIENT_HOST(cmd);
    END;
    When I execute my form I have this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: ....folder of file opened.
    Can anyone help me to solve this problem??
    Thanks in advance,
    Fabrizio

    Fabrizio Delli Priscoli wrote:
    Hi Tony.
    I have tried to run my bat file with double-click and everything is OK.
    When you say the DOS window opens for few second, is your batch file being executed?? did you see the results??
    The answer in NO for both of your questions.
    If I try to drag and drop the file I have error.
    How can I attach an image to this post, so that you can see the error??
    Thanks,
    FabrizioThis seems like a directory or OS level permission issue on the batch file, What is the error you got when you tried drag and drop the batch file in an DOS window???
    I think you need to upload the image to a site and use the markup for the image, include the full URL of the uploaded file between ! (exclamation marks) something like ! http://../post.gif ! without the spaces.
    Tony
    Edited by: Tony Garabedian on Sep 4, 2008 12:30 PM

  • How to get the Mime Type of the file?

    Hi Everyone!,
    I want to upload a random file into my table as a BLOB and simultaneously want to fill the respective another column with its MimeType. Earlier I used Oracle Apex for this, but due to my new requirement I need to make this happen with the help of PL SQL and Forms. Could you help me in getting how we can upload the file and most importantly, how we can get its Mime-Type.
    My chosen file can be of any type; it can be doc ,pdf,txt,xls ,gif or any other format.
    If you could provide the example with your reply then it would be great.
    Thanks
    Harbinder

    hi
    for that u have to use webutil.
    declare
          f varchar2(100);
    begin
         f := webutil_file.file_open_dialog();
         if f is not null then
              :doc.doc_name := f;
              end if;
         end;and
         DECLARE
    filename VARCHAR2(256);
    BEGIN
    filename := CLIENT_GET_FILE_NAME (File_Filter => 'jpg (*.jpg)|*.*|');
    READ_IMAGE_FILE(filename, 'jpg', 'image');
    END; sarah

  • Client_Get_File_Name webutil

    Hello all, i am new to oracle development and i am trying to do the forms exercises in oracle 10g. However, when i got to uploading images in Client_get_file_name, there is an error:
    I have a code in an image button.
    Here it is:
    DECLARE
      v_file VARCHAR2(250):= client_get_file_name('C:\','','JPEG Files|*.jpg|',
         'Select a product image',open_file,TRUE);
      it_image_id ITEM := FIND_ITEM('control.product_image');
    BEGIN
      client_image.read_image_file(v_file,'',it_image_id);
    END;
    Then when i press the image button, an error occurs it says:
    “FRM-92101: There was a failure in the Forms Server during stratup.”
    If ayone could help me..
    Thanks in advance!

    Hi,
    FRM-92101 is a generic error and usually it means problems with Forms libraries (pll files). Try recompiling all your pll's or at least webutil.pll.
    If this does not help, try rename webutil.pll to webutil_lib.pll, for instance, and attach it to your form. For us webutil.pll did not work at all until we renamed it.
    Make sure you've subclassed Webutil Java beans from webutil.olb to your form.
    Let know if this helped.
    P.S. When working with files the better way is:
    Let user choose file (client_get_file_name or webutil_file.file_open_dialog)
    Transfer file to some temp directory on application server (webutil_file_transfer.client_to_as)
    Read file from application server using old Forms buil-in API, READ_IMAGE_FILE in this case.
    Delete file from temporary directory on application server
    This is better for network traffic and speed, since you transfer file once, but not performing many reads through network (which is slower than single transfer).

  • Problem with client_get_file_name

    Hi,
    v_filename := client_get_file_name(........);
    :b_test.test := v_filename;
    Above is the simple code that I use.
    But my problem is ... sometimes ( I think 1 out of 10 ), when I select
    the file in the dialogue and press open button, the dialogue closes but the file path
    cannot be assigned to :b_test.test.
    Anyone knows the reason ?
    Ivan

    Hi Gerd Volberg,
    Thanks for your reply.
    Does it mean that currently we cannot avoid this problem ?
    Many users complain about that it is not stable. It seems that what I can do is to ask
    them double click the file instead of selecting the file and then pressing the open
    button.
    does it solve the problem if i use webutil_file.file_open_dialog ?
    Thanks.
    Ivan

  • WebUtil Problem - Open File - Francois Degrelle  Please reply

    Dear Francois
    I'm facing a problem file trying to open file dialogue
    1. Created a Module with two items 1. Push button 1. Text Item
    2. Created trigger "When Button Pressed" with code
    DECLARE
         LC$Path VARCHAR2(250);
         LC$File VARCHAR2(275);
    BEGIN
         LC$Path := CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory;
         LC$File := WEBUTIL_FILE.FILE_OPEN_DIALOG(LC$Path,'','|All files|*.*|','Select a file to upload');
         MESSAGE('File Selected : '||LC$File);
         :OPENFILE.TX_FILENAME := LC$File;
    EXCEPTION
         WHEN OTHERS THEN
         MESSAGE(sqlerrm);
    END;
    4. Attached PL/SQL Lib webutil.pll (with path removed option) as well as with Path ( tried both option to get rid of my problem)
    5. Open webutil.olb in object Lib
    6. Did both "subclass" as well as "Copy" in Object Group ( tried both option to get rid of my problem)
    Now ....
    Run Form --- Forms run perfect and "Open File Dialogue" comes up, can select file, move directories up/down and file name with path gets copied to text item
    Problem
    Now I save the form and close Builder and OC4J Server
    Now start Oc4J and Open this form again
    Try to complie the form and run the form then I get this error
    "FRM-92101 There was a failure in the forms Server during startup. This could happen due to invalid configuration.
    Please check the webserver log for detail"
    Another Problem , if do any combination of "Webutil.pll" (copy Path) or "Webutil.olb" (Subclass)
    I don't get First Problem but get "WEBUTIL_C.API_REGISTER_FUNCTION" werror.
    Interestingly
    I downloaded your example "WEBUTIL_DOC.fmb" and ran many times I DON"T GET THIS ERROR
    I have configured WBUTIL as per webutil manual.
    I'm using DeveloperSuite 10g (complete installation) version 10.2 On Windowx XP prof.

    Apologies for mentioning your name as I used one of your example to do it myself.
    Just thought that you will be right person to understand my problem.
    Apologies again from you and everyone on forum

Maybe you are looking for

  • MacBook Pro shuts down when opened

    This has just randomly started happening this evening. Whn I close the lid for my MBP, everything happens as normal, but then when I open it, sometimes the login screen will appear for a brief moment or two then close as if when the lid is open, the

  • Calling BRF in Adobe interactive form/Webdynpro application

    Dear Friends, I have a requirement that  I need to call BRF in Adobe interactive form. I would be great if you coud help me how to call  BRF Event in Adobe interactive form? Is it happening through webdynpro application? Please share your ideas. Than

  • Are there PHP capabilities in Adobe Muse?

    I apologize ahead of time for my lack of coding knowledge. I have basic HTML knowledge, but little more than that. I'm attempting to start an online business and have been using Adobe Muse to create my website. So far, I've created a few pages and am

  • Se produjo un error - descargando mac os x mountain lion

    Hola, yo compre la actualizacion y cuando la quiero descargar no me deja, al principio la estaba descargando y despues me dio un error en rojo al costado que decia "se produjo un error" y no me lo descarga y no me deja volverlo a descargar, como pued

  • ME_UPDATE_REQUISITION - No FM Document

    Hello FM Gurus,     I really appreciate it if you can kindly answer this question:     We have a requirement where we have to add new lines items to an existing PR and PO.      I am using  Function Module 'ME_UPDATE_REQUISITION' to add new line items