File dialog in jsf form problem

Dear community,
I created a form with several input text fields, one of which is to input a filename to attach a file to a form entry. This field has a button next to it which pops up a file dialog. My problem is if I set the button's immediate property to true all the other inputs get lost when the response is rendered. If I set immediate to false other required input fields have to be entered before I can open the file dialog.
Can anybody please help me out here?
Thanks,
Achim

Hi Achim,
Did you figure out the answer to your question? I am having the same problem.
Thanks. -Ceily

Similar Messages

  • How to open a save file dialog box in form

    hi
    all
    I have prob in form desing , i have open the save file dialog box , how to open a save dialog box
    and path of the select file to save in disk
    help
    thx

    hi
    user this query when-button-pressed trigger
    :txtfile := GET_FILE_NAME(directory_name =>'d:\ali_raza\backup\', file_filter=> 'DMP Files (*.dmp)|*.dmp|');
    Rizwan

  • Open file dialog through JSF

    can any one tell me how to display a open file dialog through java Server Faces

    Not here.
    This forum addresses Sun Jave Enterprise Messaging Server, not Java programming. We're not expert with Java.

  • File Dialog not appearing in web form after Note:74140.1

    Hello, I have implemented the source given in Note:74140.1 to replace the get_file_name function that displays the file dialog box. However I still am not able to see the dialog that the JavaBean should display. I am relativly new at linking JavaBeans with forms, so there might be something that I am missing.
    I have created the class files for FDialog and FDialogPJC and put them in an ear file. I have also modified the fiels server.xml and default-web-site.xml to include the ear file. The respective code for a button has been added to the button trigger in the form, as well as the code for the JavaBean.
    So far this has been unsuccessful. If you have a suggestion, your help is much appreciated.
    Justin.

    the problem is that when I type JDialogPJC in the implementation class property of the java bean when working in JDeveloper, it cannot locate the java class file JDialogPJC.class. This happens when I put both the JDialogPJC and JDialog classes in the jar file and put the jar file in the forms90/java directory.
    However, if I just put both class files (not contained in a jar file) in the forms90/java directory, and I specify the JDialogPJC in the implementation class property of the java bean, it works fine.
    I would like to be able to use the jar file instead of a whole load of class files sitting in the directory.

  • Save File Dialog problem

    Hello ! I'm new with java so dont be to rude plz ;) ...
    First, my situation :
    I have a jsp that calls a servlet that get data from a database. After that I have to take these data and write them in a .txt file by calling a Save File Dialog. What I've done for now is to put
    response.setContentType("application/msword");
    response.setHeader("Content-Disposition",
    "attachment; filename=\""+fileName+"\"");
    in my servlet after created my file.
    My problem :
    The Save File Dialog shown but if I save the file, it contains the code of my jsp page. I suppose that I have to "bind" the file and the response, but how do I do that ??
    Or if you have a better way to do it ...
    Thx a lot !

    Here's some changes ...
    I'm now able to get the file with a Save File Dialog, but I also get my jsp code in the top of my page.
    Here's my code :
    String fileName = "MyData.txt";
    File myFile = (File)request.getAttribute("file");
    /*cyc.mypackage.DataDefects ddDefects = bConn.getddMyDefects();
    cyc.mypackage.Export exp = new cyc.mypackage.Export();
    File myFile = exp.createDataFile(ddDefects, fileName);*/
    String value = "attachment; filename=\"" + myFile.getName() + "\";" ;
    response.setContentType("application/octet-stream");
    response.setHeader("Content-Disposition",value);
    response.setContentLength((int)myFile.length());
    BufferedInputStream fif = new BufferedInputStream(new FileInputStream(myFile.getAbsolutePath()));
    int data;
    while((data = fif.read()) != -1)
    out.write(data);
    fif.close();
    and the result is :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <link href="./css/Cyclic.css" type="text/css" rel="stylesheet">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>Infos</title>
    </head>
    <body>
    <form id="fInfos" method="POST" action="./Login.jsp" >
    <input type="submit" value="Unconnect" />
    </form>
    <form id=...>
    ( ... I dont put all cause the code is too long ...)
    </form>
    212007778197.9059295654296875-1600
    212007779245.207000732421875-1600
    212007779927.3587188720703125-1600
    212007774641.695709228515625-960
    (... rest of my good data)
    Does anybody knows how to get rid of the jsp code ??

  • Launching file open dialog box in Forms 6i

    hi,
    We have to launch file open dialog box using forms 6i within oracle apps
    and store the file into the database.
    Any ideas?
    Thanks,
    AZ

    Hi azodpe
    i have a solution(Source Code) plz give me ur email address
    i ll mail u later.
    Khurram

  • File dialog box: how get full path and filename (firefox 3.0 problem)

    Hi,
    I have a smilar problem then discussed in this thread: file dialog box: how get  full path and filename
    Now this solution doesn't seem to work in firefox 3.0,I only get the filename but not the full path.
    I have tried to solve this problem by adding *"netscape.security.PrivilegeManager.enablePrivilege("UniversalFileRead");"* in a javacript function but that doesn't do the trick
    Although when i tested it local it does work.
    Any idees how to solve this?
    Best Regards
    Stijn

    Actually, that is strange and scarry. With 20% of the browser market share they decide to behave like Microsoft did in the past - they want to decide what users need and what they do not need. With 3.0 I have a real problem with some of my applications. They are all tested in IE6, IE7, FF2.0 and they all work the same way (they even work with Opera and Safari). Now, I will for sure not go there and make it work for 3.0, just because 2 out of 200 users use FF3.0. Up to now I have always recomended FF as the best browser. 3.0 causes my opinion to change completely. Competition is always good but it is a question if it is good if we have 20 different browsers out there with equal market shares.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • File dialog in Forms 9i

    Although I may find the get_file_name function in the online help just like I know it from Forms 6.0 (and it worked well with that one in client-server), at runtime this wonderful function doesn't seem to do anything.
    Furthermore, there's no more d2kwutil.pll, nor d2kwutil.dll.
    How do I then get a file dialog from Forms 9i?

    The function does not wrok when web deployed (9i or 6i) you will have to write a JavaBean to do this (see the FileUpload sample in the demos which actually contains this code)

  • Problem using the File Dialog Box in a Client/Server application

    I am developping a client-server application using Labview 5.1 . The application on the server acquires data from some instruments and saves it on file, while the application on the clients displayes such acquired data. For doing this I call some routines on the server via the "Open Application vi" (remote connection). All goes well except when I open on the server the "File Dialog Box vi" : in this case the application on the clients is blocked (is blocked the execution of the called vi on the server). Only when
    the File Dialog Box on the server is closed, the execution of the called vi on the server starts again.
    I need to use the File Dialog Box on the server, but I don' t want to stop at the same time
    the clients !!
    I need help for resolving such problem.
    Many thanks in advance !!!

    Hi!
    waldemar.hersacher wrote:
    "It seems that the VIs called by the clients are running in the user interface thread.
    A call to the file dialog box will call a modal system dialog. So LV can't go on executing VIs in the user interface thread."
    Are you sure? I think, that File Dialog, called by LabVIEW File Dialog from Advanced File Functions Palette doesn't blocking any cycles in subVI, which running in UI Thread. Look in my old example (that was prepared for other topic, but may be good for this topic too).
    2 linus:
    I think, you must a little bit reorganize you application for to do this. You must put your File Dialog into separated cycle. This cycle, of course, will be blocked when File Dialog appear on the screen. But other cy
    cle, which responsible for visualization will run continuosly at the same time...
    Attachments:
    no_block_with_file_open_dialog.zip ‏42 KB

  • File dialog problems

    When I try to place a file, the file dialog box closes automatically before I have a chance to find my file. Seems like a bug. Had to switch back to CS6. That's two problems now! AE CC is unusable too!

    There was no question in your post. Do you seek any assistance?
    To place files, you can also drag 'n drop.
    About the self-closing dialog window - is your mouse/keyboard perhaps faulty?

  • How to get an open file dialog in Forms 9i?

    Although in online help I can find the get_file_name function just like it was in Forms 6.0, at runtime this wonderful function doesn't seem to do anything.
    Furthermore, there is no more d2kwutil.pll, nor d2kwutil.dll.
    How could I get an open file dialog?

    Hi,
    actually this functionality does not work. The reason for this is that Forms9i is Web only and there is no functionality downloaded with the generic Java Applet. For the moment I filed an enhancement request to have this on our radar. Meanwhile, if you need thi sfunctionality you can help yourself by writing a PJC that opens a dialog and performs the action that you want to.
    Frank
    Forms Product Management

  • How to develop a file dialog box in a oracle forms

    please help me its an urgent task,
    how to develop a file dialog box in a oracle 6i forms
    in html we will use <input type ="file"/> to open a dialog box,so that we can upload file to the server .similarly how to upload a file using oracle.

    For Windows there is a library that comes with forms d2kwutil.pll that contains a package win_api_dialog. use the open_file procedure.
    NOTE******** when you select a file from whatever windows directory you choose, it will change your working directory to that directory so right after that you will need to reassign your working directory back to what it originally was.
    Also, you will need to have d2kwut60.dll in the same directory as your d2kwutil.pll. Both come with Developer.
    Example code is
    v_runpath := win_api_environment.get_working_directory(TRUE);
    v_filename := win_api_dialog.open_file('Find File','C:\','*.*',TRUE, 0, TRUE);
    win_api_environment.set_working_directory(v_runpath,true);
    Hope this helps

  • Why the open file dialog form goes to SAP background.

    I created a addon form and there is a button to open a file dialog. When I click it, this dialog went to the background of SAP. How to fix.Please

    Hi,
    Just add a class and give this source
    Public Class WindowWrapper
        Implements System.Windows.Forms.IWin32Window
        Private _hwnd As IntPtr
        Public Sub New(ByVal handle As IntPtr)
            _hwnd = handle
        End Sub
        Public ReadOnly Property Handle() As System.IntPtr Implements System.Windows.Forms.IWin32Window.Handle
            Get
                Return _hwnd
            End Get
        End Property
    End Class
    Give this source in ur add-on class
    Public ShowFolderBrowserThread As Threading.Thread
    Public Sub ShowFolderBrowser()
            Try
                Dim MyTest As New OpenFileDialog
                Dim MyProcs() As Process
                MyProcs = Process.GetProcessesByName("SAP Business One")
                If MyProcs.Length = 1 Then
                    For i As Integer = 0 To MyProcs.Length - 1
                        Dim MyWindow As New WindowWrapper(MyProcs(i).MainWindowHandle)
                        MyTest.InitialDirectory = "C:\"
                        MyTest.ShowDialog(MyWindow)
                        Dim ab As New System.IO.FileInfo(MyTest.FileName)
                        Dim db As SAPbouiCOM.DBDataSource = frm.DataSources.DBDataSources.Item("@BR_ATTACH")
                        mat1 = frm.Items.Item("ATMatrix").Specific
                        mat1.AddRow()
                        db.SetValue("U_Path", db.Offset, ab.DirectoryName)
                        db.SetValue("U_FileName", db.Offset, ab.DirectoryName + "\" + ab.Name)
                        mat1.SetLineData(1)
                    Next
                Else
                    Console.WriteLine("No SBO instances found.")
                End If
            Catch ex As Exception
            End Try
        End Sub
    Give this source in item event
    Case SAPbouiCOM.BoEventTypes.et_CLICK
    If pVal.ItemUID = "BtnBrowse" And pVal.BeforeAction = False Then
                            ShowFolderBrowserThread = New Threading.Thread(AddressOf ShowFolderBrowser)
                            If ShowFolderBrowserThread.ThreadState = Threading.ThreadState.Unstarted Then
                                ShowFolderBrowserThread.SetApartmentState(Threading.ApartmentState.STA)
                                ShowFolderBrowserThread.Start()
                                ShowFolderBrowserThread.Join()
                            Else
                                ShowFolderBrowserThread.Abort()
                            End If
    Try this......................... it worked out well for me....
    Edited by: Sridhar R Badri on Apr 23, 2008 7:47 AM
    Edited by: Sridhar R Badri on Apr 23, 2008 8:07 AM
    Edited by: Sridhar R Badri on Apr 23, 2008 8:08 AM

  • Submiting forms returns a "Save As File" dialog box

    I've got a form that users return via email, one user always gets a Save As File dialog box and since this doesn't match the instructions.  User doesn't return the form as others do.  Any help greatly appreiciated.

    JFileChooser does support a "save-as" dialog. Follow the link from the API documentation to the tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html

  • Jsf form to pdf file, how?

    Hi all how to transform a jsf form to a pdf to download?
    many thanks

    There is no such thing. Generally you use the print function of the browser - it is your job to properly apply css so a page prints nicely. Otherwise you have to dig into itext which is the api for producing pdf files.

Maybe you are looking for