File Chooser to open a document?

Does anyone know how I can display a file chooser for a directory on the application server in Forms 10g and then open the file?

The problem I'm trying to solve is that I have several directories on my Windows application server with report files in them and I want the user of the Forms application to be able to access them. I want to restrict access to some of the directories via privileges I define in a database table associated to the user of the Forms application. I was using Windows security and web.show_document instead of the database table approach, but some of my users need to access the Forms application from remote sites (or home) so Windows security won't work in those cases.

Similar Messages

  • I cannot choose to open Word documents, I always have to save them first.

    With most applications like Excel and pdf downloads I can choose whether to open the document or save it, but with Word documents I don't have the option, I have to save them.

    See "File handling in Firefox 3 and SeaMonkey 2":
    * http://kb.mozillazine.org/File_types_and_download_actions

  • Different behaviour between IE6 and IE on opening Office documents via KM

    Hi all,
    we're in the process of rolling out Internet Explorer 7 (IE7) and noticed something unexpected when opening non-html documents from a KM navigation iview. When clicking on the links in the ivew the documents are all opened in a new window because the hyperlink / href contains "target=_blank". When the document itself is for instance an Excel document, the browser will ask wether you want to open the document or not. When you choose to open the document, Excel launches and the blank IE6 window is closed in the background. When the user is done with the document he or she will return to the portal screen.
    This nice behaviour does not occur with IE7. The blank window remains open so when the user closes the Office document they are looking at an empty IE7 screen.
    Is there any way to fix this by customization or even by code change? It seems to me that this is more a SAP issue because for all HTML pages and for all documents that have IE plugins such as PDF'syou want to open a new window but for the others you want only the application to be lauched, not an empty IE.
    Message [3141588|https://www.sdn.sap.com/irj/sdn/thread?threadID=147594&messageID=3141588#3141588] seems to deal with the same problem and got a somewhat disturbing answer.
    The resource rendering parameter rndOpenTargetType does not seem to help see [Help.sap.com|http://help.sap.com/saphelp_nw70/helpdata/EN/87/3d48475ee8bd448c4031aa98d90524/frameset.htm]
    Marcel

    I found the solution on another site, superuser.com, so I can't claim the solution as my own, but it worked for me. Kent Ng says: 
    I face the similar issue with Excel 2003. If you have installed Skype-Click-to-Call, just removed it to resolve this issue.

  • File chooser set directory

    Is there any way of setting the directory the file chooser opens, as a default? If the files you are supposed to choose between are in the program's folder, I want the file chooser to open there, not somewhere else, so the user has to look around for the files... Anyone?

    The APIs are your friend.
    Love the APIs.
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JFileChooser.html#JFileChooser(java.io.File)

  • JSF component (file-chooser, string feature is only needed).

    For a rapid prototype...
    I'm looking for a file-chooser that uses a JSF component, so I can get the string to the backing bean.
    I do not need to upload a file.
    Whats the easiest way to do this?
    More specifically, I want to be able to push on a button and have the file chooser dialog open, and then have the selection go to the input text component. I also need to bind it to the backing bean. I'm using JSF 2.0 and also have primefaces setup. I tried to mix in tomahawk, but things went crazy.
    Thanks,
    Robert

    EJP wrote:
    And the documentation ;-(((((((Yay, A nice rant thread! Don't get me started on documentation, show me one API or framework that has documentation that covers not only the beginner things but also the production scale features (properly, not just mentioning that the features exist).
    Of course it all makes sense, complete and helpful documentation halts the sales of books. for example, did you know that a book about Richfaces 4 has just hit the market?

  • Message'there was an error opening this document.The file cannot be found'

    Using xp home and when I click to download the pdf file, it will give 3 options been 'open'/'save'/?. When I choose the 'open' option, it will give me the above message "there was an error opening this document.The file cannot be found"
    owever if I choose to "save" and I will be able to open the file and read it. In this pc its using Adobe Reader 8.1.2 with a patch. It was working fine prior to this sudden occurance of the error.
    Strangely I have another pc with the same specification, I was able to choose "open" and be able to read the file. Can anyone help to resolve the issue by using the "open' option instead of "save, then open". Greateful for your prompt response.

    Fyi, in addition to my earlier post, the other pc is using Adobe 8.1.1 and no other patch. I was trying to find 8.1.1 version but could not find a trust worthy site to load from. Do you think the error caused by using the 8.1.2 version? Thanks

  • Batch combine files into one illustrator document - how to open target document?

    I am making a script which will:
    1) Open a folder of Illustrator files
    2) Open each file in the folder (these files are called the source files)
    3) Select all the contents of the source file
    4) Copy the contents of the source file
    5) Paste these contents into a target file as a new layer
    6) Ensure the new layer has the same name as the old source file
    However, I don't know how to tell Illustrator where my target file is. How can I do this?
    Also, when I paste, how can I turn off paste rembers layers. (So the layers get pasted into the new layer that has the same name as the old document).
    Here is my code:
    // JavaScript Document
    //Set up vairaibles
    var destDoc, sourceDoc, sourceFolder;
    // Select the source folder.
    sourceFolder = Folder.selectDialog('Select the folder with Illustrator files that you want to mere into one', '~');
    // If a valid folder is selected
    if (sourceFolder != null) {
              files = new Array();
              // Get all files matching the pattern
              files = sourceFolder.getFiles();
              if (files.length > 0) {
                        // Get the destination to save the files
                        destDoc = document.selectDialog('Select the final saved document', '~');
                        for (i = 0; i < files.length; i++) {
                                  sourceDoc = app.open(files[i]); // returns the document object
                                  var myLayers = sourceDoc.layers; // All layers in Active Document
                                  //Go through all layers of source document and copy artwork
                                  for (i = 0; i < myLayers.length; i++) {
                                            myLayers[i].hasSelectedArtwork = true;
                                  with(sourceDoc) {
                                            var count = pageItems.length;
                                            for (var i = 0; i < count; i++) {
                                                      pageItems[i].selected = true;
                                            redraw();
                                            copy();
                                            for (var i = 0; i < count; i++) {
                                                      pageItems[i].selected = false;
                                  //Create a new title variable that has the title of the source document
                                  var title = sourceDoc.name;
                                  var title = title.substring(0, title.length - 4); //(remove extension from name)
                                  //Close the Source Document
                                  sourceDoc.close(SaveOptions.DONOTSAVECHANGES);
                                  //Open the Destination Document and create a new layer in it that is named after the title variation
                                  var newLayer = destDoc.layers.add();
                                  newLayer.name = title;
                                  //Paste into this new layer
                                  destDoc = app.paste();
              else {
                        alert('No matching files found');
    Thanks in advance for any help   
    Edit: Also, when pasting, how can I paste in place instead of just pasting.

    I have been studying this script. It is similar to what I need except it places the source files (Instead of copying & pasting them)
    http://kelsocartography.com/blog/?p=204
    I have adapted the script to my needs and it works perfectly, except it has the same problem as before: It pastes the first source file, but then it endlessly starts pasting the second source file (in a loop) and so I have to force quit.
    So my new question is, when looping through files how can you get illustrator to move on the next one?
    The original kelsocartography had this line:
    thisPlacedItem = newLayer.placedItems.add()
    thisPlacedItem.file = imageList[i];
    I belive this line is what makes Illustrator move onto the next file, but I am not sure how to adapt it to my code.
    Here is my code so far:
    function getFolder() {
              return Folder.selectDialog('Please select the folder to be imported:', Folder('~'));
    function importFolderAsLayers(selectedFolder) {
              // if a folder was selected continue with action, otherwise quit
              var myDocument;
              if (selectedFolder) {
                        myDocument = app.documents.add();
                        var firstImageLayer = true;
                        var newLayer;
                        var thisPlacedItem;
                        // create document list from files in selected folder
                        var documentList = selectedFolder.getFiles();
                        for (var i = 0; i < documentList.length; i++) {
                                  // open each document in file list
                                  if (documentList[i] instanceof File) {
                                            // get the file name
                                            var fName = documentList[i].name.toLowerCase();
                                            var sourceDoc = app.open(documentList[i]); // returns the document object
                                            var myLayers = sourceDoc.layers; // Select All layers in Active Document
                                            //Go through all layers of source document and copy artwork
                                            for (i = 0; i < myLayers.length; i++) {
                                                      myLayers[i].hasSelectedArtwork = true;
                                            with(sourceDoc) {
                                                      var count = pageItems.length;
                                                      for (var i = 0; i < count; i++) {
                                                                pageItems[i].selected = true;
                                                      redraw();
                                                      copy();
                                                      for (var i = 0; i < count; i++) {
                                                                pageItems[i].selected = false;
                                            //Create a new title variable that has the title of the source document
                                            var title = sourceDoc.name;
                                            var title = title.substring(0, title.length - 4); //(remove extension from name)
                                            //Close the Source Document
                                            // check for supported file formats
                                            if ((fName.indexOf(".eps") == -1)) {
                                                      continue;
                                            } else {
                                                      if (firstImageLayer) {
                                                                newLayer = myDocument.layers[0];
                                                                firstImageLayer = false;
                                                      } else {
                                                                newLayer = myDocument.layers.add();
                                                      // Give the layer the name of the image file
                                                      newLayer.name = fName.substring(0, fName.indexOf("."));
                                                      // Place the image on the artboard
                                                      sourceDoc.close(SaveOptions.DONOTSAVECHANGES);
                                                      //Paste into this new layer
                                                      newLayer = app.paste();
                        if (firstImageLayer) {
                                  // alert("The action has been cancelled.");
                                  // display error message if no supported documents were found in the designated folder
                                  alert("Sorry, but the designated folder does not contain any recognized image formats.\n\nPlease choose another folder.");
                                  myDocument.close();
                                  importFolderAsLayers(getFolder());
              } else {
                        // alert("The action has been cancelled.");
                        // display error message if no supported documents were found in the designated folder
                        alert("Rerun the script and choose a folder with images.");
                        //importFolderAsLayers(getFolder());
    // Start the script off
    importFolderAsLayers(getFolder());

  • How do I prevent Save as .csv file alwways appending .txt to the filename if I choose the "Open with" action?

    My ASP csv download page is calling:
    Response.Clear
    Response.AddHeader "content-disposition","attachment; filename=filename.csv"
    Response.ContentType = "Content-Type: text/csv; charset=utf-8"
    When I click on the link to this ASP page the Firefox "Opening filename.csv" dialog appears:
    filename.csv
    which is a: Text Document
    If I choose "Open with <Any Application name>" the file is always opened by the application with a .txt appended to the filename, which in this particular case prevents my spreadsheet software from correctly opening it.
    a) How do I prevent the .txt being appended to the file name if OpenWith is used?
    b) Is there a way to add a CSV type to the Tools->Options Applications Content Type list to prevent the "which is a: Text Document" message?
    This behaviour does not happen in Chrome, Opera, Safari or IE.

    Is there no entry in Application Options for text/csv?
    orange Firefox button ''or'' classic Tools menu > Options > Applications
    In the search box, type csv and pause while Firefox filters the list.
    If you have Microsoft Office installed, the dialog typically lists "Microsoft Office Excel Comma Separated Values File (text/csv)" (you need to display the mouseover tooltip to see all of it).
    I assume Firefox extracts this information from the registry. If you want to reset the Application Options and have Firefox rebuild them, the method is described in this article:
    https://support.mozilla.org/en-US/kb/cant-download-or-save-files#w_reset-download-actions-for-all-file-types ("Reset download actions for all file types")

  • When I try to open a document from my file on Mac OS X the following message appears, with the Bluetooth logo: 'SELECT A BLUETOOTH DEVICE ....Select a device to send file ...' I then have to go to the source of the document, e.g. Pages, to open the file.

    When I try to open a document from my file on Mac OS X the following message appears, with the Bluetooth logo: 'SELECT A BLUETOOTH DEVICE ....Select a device to send file ...' I then have to go to the source of the document, (e.g. Pages), to open the file. Please could someone help?

    The Get Info dialog should look something like this:
    The "Change All" button should be at the bottom of the "Open With" section.  This is how it appears in Snow Leopard.  Other OSX versions many be slightly different.
    If something is changing the setting back to something else you may have a deeper problem than I am able to help you with.  What is appearing in the Open with area before you correct it?
    If the problem is still persisting, instead of double clicking on the file to open it, try right or control clicking and then select Open With and choose the proper app from the list.

  • AHHHHHH! Multiple open file chooser windows

    Ok, I am going nuts here. I have figured out the problem of getting the data to appear on the same frame that I originally open. The menu at the top has File -> Open. When the user first comes into the form, that is the only thing enabled. I am using a different file opener for this initial opening. Here is why (although, it doesn't fix the problem):
    When the user opens the file, the data appears in the frame. If the user opens another file, the data appears in the frame and another file open chooser window appears even though the users did not select it again. If the user then opens another file, then that is it. If the user then goes to the menu and selects File->Open the file open chooser appears. The user selects a file and the data appears in the frame, but another file open chooser appears. I have had it happen up to 8 times. Now, I have no idea why this is getting called over and over again. It is this that is being called multiple times:
           jMenuFileOpen.addActionListener(new ActionListener()  {
            public void actionPerformed(ActionEvent e) {
              System.out.println("IS THIS THE OPEN THAT IS CALLED OVER AND OVER AND OVER AGAIN");
              jMenuFileOpen_actionPerformed(e);
          });That println is printing each time another file open chooser window appears. I am pulling out my hair trying to figure this one out. The way I am starting this up is this:
      public FDASFrame(File file) {
        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
        inputfile = file;
        try {
          jbInit();
        catch(Exception e) {
          e.printStackTrace();
      public void setFile (File file) {
        enableEvents(AWTEvent.WINDOW_EVENT_MASK);
        inputfile = file;
        try {
          jbInit();
        catch(Exception e) {
          e.printStackTrace();
      }These methods are in the main frame - FDASFrame. I am wondering if that is the problem. Here is the part of the filechooser that calls the main frame when the file is gotten:
                parent.setFile(file);
                JFrame frame = (JFrame)parent;Has anyone got any ideas to this problem? It might solve the problem of the tables getting duplicate data in them, too, each time a new file is opened.
    Thanks to anyone who has any ideas on how to solve this. I am stumped.
    Allyson

    I have other tests, but this is the one that is messing me up. Here is the whole file chooser (it is really long):
    package sdh;
    import java.io.*;
    //import java.io.File;
    //import java.io.FileInputStream;
    //import java.io.BufferedReader;
    //import java.io.InputStreamReader;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    //import javax.swing.filechooser.*;
    import java.util.*;
    import org.w3c.dom.Document;
    import org.w3c.dom.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    public class FileChooserFrame extends JFrame {
      static File file;
      String tempfile, wholeline;
      PrintWriter textfile;
      Hashtable QualityCodes = new Hashtable();
      Hashtable DistanceCodes = new Hashtable();
      Hashtable ScreeningCodes = new Hashtable();
      Hashtable ObjectCodes = new Hashtable();
      Hashtable WeatherCodes = new Hashtable();
      Hashtable StabilityCodes = new Hashtable();
        public FileChooserFrame(FDASFrame parent, String filetype) {
          //Create a file chooser
          if (filetype.equals("Open")) {
            final JFileChooser fc = new JFileChooser();
            fc.addChoosableFileFilter(new xmlExtensionFileFilterClass());
            fc.addChoosableFileFilter(new fsExtensionFileFilterClass());
            fc.addChoosableFileFilter(new sdmExtensionFileFilterClass());
            fc.addChoosableFileFilter(new rcvExtensionFileFilterClass());
            fc.addChoosableFileFilter(new txtExtensionFileFilterClass());
            fc.setAcceptAllFileFilterUsed(false);
            int returnVal = fc.showOpenDialog(FileChooserFrame.this);
            if (returnVal == JFileChooser.APPROVE_OPTION) {
              file = fc.getSelectedFile();
              String ext = fc.getSelectedFile().toString().substring(fc.getSelectedFile().toString().indexOf(".")+1);
              /** @todo FDASFrame comes up each time you open a file - does not put data in the one already up */
    //        FDASFrame fdas = FDASFrame.getInstance();
    //          JFrame frame = new FDASFrame(file);
              if (ext.equals("txt")) {
                parent.setFile(file);
                JFrame frame = parent;
    //            JFrame frame = new FDASFrame(file);
                try {
                  String v;
                  FileInputStream f = new FileInputStream(file);
                  BufferedReader b = new BufferedReader(new InputStreamReader(f));
                  if ((v = b.readLine()) != null) {
                    StringTokenizer t = new StringTokenizer(v,"|");
                    if (t.nextElement().equals("FH")) {
                      frame.setTitle(t.nextElement().toString() + " Version " + t.nextElement().toString());
                catch(Exception ee) {
                  ee.printStackTrace();
                frame.addWindowListener(new WindowAdapter() {
                  public void windowClosing(WindowEvent e) {
                    System.exit(0);
                frame.setVisible(true);
              else if (ext.equals("xml") || ext.equals("sdm") || ext.equals("sdm.xml")) {
                // Hashtable for WeatherCodes for setups
                WeatherCodes.put("Clear","4");
                WeatherCodes.put("Pt. Cloudy","3");
                WeatherCodes.put("Cloudy","2");
                WeatherCodes.put("Hazy/Foggy","1");
                WeatherCodes.put("","0");
                // Hashtable for StabilityCodes for setups
                StabilityCodes.put("Good","3");
                StabilityCodes.put("Fair","2");
                StabilityCodes.put("Poor","1");
                StabilityCodes.put("","0");
                // Hashtable for ObjectCodes for objects
                ObjectCodes.put("Land","9");
                ObjectCodes.put("Mountain","8");
                ObjectCodes.put("Water","7");
                ObjectCodes.put("Dense Trees","6");
                ObjectCodes.put("Thin Trees","5");
                ObjectCodes.put("Building","4");
                ObjectCodes.put("Tower","3");
                ObjectCodes.put("Pole","2");
                ObjectCodes.put("Antenna","1");
                ObjectCodes.put("","0");
                // Hashtable for ScreeningCodes for objects
                ScreeningCodes.put("High","4");
                ScreeningCodes.put("Doubtful","3");
                ScreeningCodes.put("Intermediate","2");
                ScreeningCodes.put("Photo","1");
                ScreeningCodes.put("","0");
                // Hashtable for DistanceCodes for objects
                DistanceCodes.put("Feet","3");
                DistanceCodes.put("Meters","2");
                DistanceCodes.put("NMI","1");
                DistanceCodes.put("","0");
                // Hashtable for QualityCodes for points
                QualityCodes.put("High","3");
                QualityCodes.put("Medium","2");
                QualityCodes.put("Low","1");
                QualityCodes.put("","0");
                try{
                  tempfile = fc.getCurrentDirectory().toString() + "\\Tempxml.txt";
                  textfile = new PrintWriter(new BufferedWriter(new FileWriter(tempfile)));
                catch(Exception ee) {
                  ee.printStackTrace();
                try {
                  DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                  DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                  Document doc = docBuilder.parse(file);
                  // normalize text representation
                  doc.getDocumentElement ().normalize ();
                  NodeList rootlist = doc.getElementsByTagName("root");
                  NodeList FHList = null;
                  Node rootnode = rootlist.item(0);
                  if(rootnode.getNodeType() == Node.ELEMENT_NODE){
                    Element FHElement = (Element)rootnode;
                    FHList = FHElement.getElementsByTagName("FileHeader");
                    Element FHeElement = (Element)FHList.item(0);
                    NodeList textFHList = FHeElement.getChildNodes();
                    wholeline = ((Node)textFHList.item(0)).getNodeValue().trim();
                  Node FHnode = FHList.item(0);
                  if(FHnode.getNodeType() == Node.ELEMENT_NODE){
                    Element FHelemElement = (Element)FHnode;
                    NodeList IDList = FHelemElement.getElementsByTagName("Identifier");
                    Element IDElement = (Element)IDList.item(0);
                    NodeList textIDList = IDElement.getChildNodes();
                    wholeline = wholeline + "|" + ((Node)textIDList.item(0)).getNodeValue().trim();
                    NodeList VerList = FHelemElement.getElementsByTagName("Version");
                    Element VerElement = (Element)VerList.item(0);
                    NodeList textVerList = VerElement.getChildNodes();
                    wholeline = wholeline + "|" + ((Node)textVerList.item(0)).getNodeValue().trim();
                    textfile.println(wholeline);
                  wholeline = "";
                  NodeList siteList = doc.getElementsByTagName("Site");
                  Element siteElement = (Element)siteList.item(0);
                  NodeList textsiteList = siteElement.getChildNodes();
                  wholeline = ((Node)textsiteList.item(0)).getNodeValue().trim();
                  Node sitenode = siteList.item(0);
                  if (sitenode.getNodeType() == Node.ELEMENT_NODE) {
                    Element siteelemElement = (Element) sitenode;
                    NodeList SiteNameList = siteelemElement.getElementsByTagName("Site_Name");
                    Element SiteNameElement = (Element)SiteNameList.item(0);
                    NodeList textSiteNameList = SiteNameElement.getChildNodes();
                    wholeline = wholeline + "|" + ((Node)textSiteNameList.item(0)).getNodeValue().trim();
                    NodeList EquipTypeList = siteelemElement.getElementsByTagName("Equipment_Type");
                    Element EquipTypeElement = (Element)EquipTypeList.item(0);
                    NodeList textEquipTypeList = EquipTypeElement.getChildNodes();
                    wholeline = wholeline + "|" + ((Node)textEquipTypeList.item(0)).getNodeValue().trim();
                    NodeList LatList = siteelemElement.getElementsByTagName("Site_Latitude");
                    Element LatElement = (Element)LatList.item(0);
                    NodeList textLatList = LatElement.getChildNodes();
                    wholeline = wholeline + "|" + ((Node)textLatList.item(0)).getNodeValue().trim();
                    NodeList LonList = siteelemElement.getElementsByTagName("Site_Longitude");
                    Element LonElement = (Element)LonList.item(0);
                    NodeList textLonList = LonElement.getChildNodes();
                    wholeline = wholeline + "|" + ((Node)textLonList.item(0)).getNodeValue().trim();
                    NodeList GtFPList = siteelemElement.getElementsByTagName("Ground_to_Focal_Point");
                    Element GtFPElement = (Element)GtFPList.item(0);
                    NodeList textGtFPList = GtFPElement.getChildNodes();
                    wholeline = wholeline + "|" + ((Node)textGtFPList.item(0)).getNodeValue().trim();
                    NodeList SiteElvList = siteelemElement.getElementsByTagName("Site_Elevation");
                    Element SiteElvElement = (Element)SiteElvList.item(0);
                    NodeList textSiteElvList = SiteElvElement.getChildNodes();
                    wholeline = wholeline + "|" + ((Node)textSiteElvList.item(0)).getNodeValue().trim();
                    NodeList UCAList = siteelemElement.getElementsByTagName("Upper_Coverage_Angle");
                    Element UCAElement = (Element)UCAList.item(0);
                    NodeList textUCAList = UCAElement.getChildNodes();
                    wholeline = wholeline + "|" + ((Node)textUCAList.item(0)).getNodeValue().trim();
                  textfile.println(wholeline);
                  NodeList listOfSetups = doc.getElementsByTagName("Setup");
                  int totalSetups = listOfSetups.getLength();
                  for (int s = 0; s < totalSetups; s++) {
                    wholeline = "";
                    Node Setupnode = listOfSetups.item(s);
                    Element setupElement = (Element)listOfSetups.item(s);
                    NodeList textsetupList = setupElement.getChildNodes();
                    wholeline = ((Node)textsetupList.item(0)).getNodeValue().trim();
                    if (Setupnode.getNodeType() == Node.ELEMENT_NODE) {
                      Element setuplistElement = (Element)Setupnode;
                      NodeList SurveyorList = setuplistElement.getElementsByTagName("Surveyor");
                      Element SurveyorElement = (Element)SurveyorList.item(0);
                      NodeList textSurveyorList = SurveyorElement.getChildNodes();
                      wholeline = wholeline + "|" + ((Node)textSurveyorList.item(0)).getNodeValue().trim();
                      NodeList Azi2FPList = setuplistElement.getElementsByTagName("Azimuth_to_Focal_Point");
                      Element Azi2FPElement = (Element)Azi2FPList.item(0);
                      NodeList textAzi2FPList = Azi2FPElement.getChildNodes();
                      wholeline = wholeline + "|" + ((Node)textAzi2FPList.item(0)).getNodeValue().trim();
                      NodeList Dist2FPList = setuplistElement.getElementsByTagName("Dist_to_Focal_Point");
                      Element Dist2FPElement = (Element)Dist2FPList.item(0);
                      NodeList textDist2FPList = Dist2FPElement.getChildNodes();
                      wholeline = wholeline + "|" + ((Node)textDist2FPList.item(0)).getNodeValue().trim();
                      NodeList Hi2FPList = setuplistElement.getElementsByTagName("Hi_to_Focal_Point");
                      Element Hi2FPElement = (Element)Hi2FPList.item(0);
                      NodeList textHi2FPList = Hi2FPElement.getChildNodes();
                      wholeline = wholeline + "|" + ((Node)textHi2FPList.item(0)).getNodeValue().trim();
                      NodeList WeatherList = setuplistElement.getElementsByTagName("Weather");
                      Element WeatherElement = (Element)WeatherList.item(0);
                      NodeList textWeatherList = WeatherElement.getChildNodes();
                      wholeline = wholeline + "|" + (String)WeatherCodes.get(((Node)textWeatherList.item(0)).getNodeValue().trim());
                      NodeList StabilityList = setuplistElement.getElementsByTagName("Stability");
                      Element StabilityElement = (Element)StabilityList.item(0);
                      NodeList textStabilityList = StabilityElement.getChildNodes();
                      wholeline = wholeline + "|" + (String)StabilityCodes.get(((Node)textStabilityList.item(0)).getNodeValue().trim());
                      Element objectElement = (Element)Setupnode;
                      NodeList textobjectList = objectElement.getElementsByTagName("Object");
                      int TotalObjs = textobjectList.getLength();
                      if (TotalObjs == 0) {
                        textfile.print(wholeline);
                      else {
                        textfile.println(wholeline);
                      for (int j = 0; j < TotalObjs; j++) {
                        wholeline = "";
                        Node Objectnode = textobjectList.item(j);
                        Element objectelement = (Element)textobjectList.item(j);
                        NodeList textObjList = objectelement.getChildNodes();
                        wholeline = ((Node)textObjList.item(0)).getNodeValue().trim();
                        if (Objectnode.getNodeType() == Node.ELEMENT_NODE) {
                          Element objElement1 = (Element)Objectnode;
                          NodeList textobjList1 = objElement1.getElementsByTagName("Object_Type");
                          Element objelement1 = (Element)textobjList1.item(0);
                          NodeList textOList1 = objelement1.getChildNodes();
                          wholeline = wholeline + "|" + (String)ObjectCodes.get(((Node)textOList1.item(0)).getNodeValue().trim());
                          Element objElement2 = (Element)Objectnode;
                          NodeList textobjList2 = objElement2.getElementsByTagName("Screening_Type");
                          Element objelement2 = (Element)textobjList2.item(0);
                          NodeList textOList2 = objelement2.getChildNodes();
                          wholeline = wholeline + "|" + (String)ScreeningCodes.get(((Node)textOList2.item(0)).getNodeValue().trim());
                          Element objElement3 = (Element)Objectnode;
                          NodeList textobjList3 = objElement3.getElementsByTagName("Distance_Units");
                          Element objelement3 = (Element)textobjList3.item(0);
                          NodeList textOList3 = objelement3.getChildNodes();
                          wholeline = wholeline + "|" + (String)DistanceCodes.get(((Node)textOList3.item(0)).getNodeValue().trim());
                          Element PointElement = (Element)Objectnode;
                          NodeList textPointList = PointElement.getElementsByTagName("Point");
                          int TotalPts = textPointList.getLength();
                          textfile.println(wholeline);
                          for (int k = 0; k < TotalPts; k++) {
                            wholeline = "";
                            Node Pointnode = textPointList.item(k);
                            Element pointelement = (Element)textPointList.item(k);
                            NodeList textPList = pointelement.getChildNodes();
                            wholeline = ((Node)textPList.item(0)).getNodeValue().trim();
                            if (Pointnode.getNodeType() == Node.ELEMENT_NODE) {
                              Element pointElement1 = (Element)Pointnode;
                              NodeList textpointList1 = pointElement1.getElementsByTagName("Azimuth");
                              Element pointelement1 = (Element)textpointList1.item(0);
                              NodeList textPList1 = pointelement1.getChildNodes();
                              wholeline = wholeline + "|" + ((Node)textPList1.item(0)).getNodeValue().trim();
                              Element pointElement2 = (Element)Pointnode;
                              NodeList textpointList2 = pointElement2.getElementsByTagName("Vertical_Angle");
                              Element pointelement2 = (Element)textpointList2.item(0);
                              NodeList textPList2 = pointelement2.getChildNodes();
                              wholeline = wholeline + "|" + ((Node)textPList2.item(0)).getNodeValue().trim();
                              Element pointElement3 = (Element)Pointnode;
                              NodeList textpointList3 = pointElement3.getElementsByTagName("Distance");
                              Element pointelement3 = (Element)textpointList3.item(0);
                              NodeList textPList3 = pointelement3.getChildNodes();
                              wholeline = wholeline + "|" + ((Node)textPList3.item(0)).getNodeValue().trim();
                              Element pointElement4 = (Element)Pointnode;
                              NodeList textpointList4 = pointElement4.getElementsByTagName("Quality");
                              Element pointelement4 = (Element)textpointList4.item(0);
                              NodeList textPList4 = pointelement4.getChildNodes();
                              wholeline = wholeline + "|" + (String)QualityCodes.get(((Node)textPList4.item(0)).getNodeValue().trim());
                            textfile.println(wholeline);
                  textfile.close();
                  File f = new File(tempfile);
    //              JFrame frame = new FDASFrame(f);
                  parent.setFile(f);
                  JFrame frame = parent;
                  if(FHnode.getNodeType() == Node.ELEMENT_NODE){
                    Element FHelemElement = (Element)FHnode;
                    NodeList IDList = FHelemElement.getElementsByTagName("Identifier");
                    Element IDElement = (Element)IDList.item(0);
                    NodeList textIDList = IDElement.getChildNodes();
                    NodeList VerList = FHelemElement.getElementsByTagName("Version");
                    Element VerElement = (Element)VerList.item(0);
                    NodeList textVerList = VerElement.getChildNodes();
                    frame.setTitle(((Node)textIDList.item(0)).getNodeValue().trim() + " Version " + ((Node)textVerList.item(0)).getNodeValue().trim());
                  frame.addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
                     System.exit(0);
                  frame.setVisible(true);
                catch(Exception ee) {
                  ee.printStackTrace();
          else if (filetype.equals("Save")) {
            final JFileChooser fc = new JFileChooser();
            fc.setFileFilter(new saveExtensionFileFilterClass());
            fc.setAcceptAllFileFilterUsed(false);
            int returnVal = fc.showSaveDialog(FileChooserFrame.this);
            if (returnVal == JFileChooser.APPROVE_OPTION) {
              file = fc.getSelectedFile();
          else if (filetype.equals("Log")) {
            final JFileChooser fc = new JFileChooser();
            fc.setFileFilter(new logExtensionFileFilterClass());
            fc.setAcceptAllFileFilterUsed(false);
            int returnVal = fc.showSaveDialog(FileChooserFrame.this);
            if (returnVal == JFileChooser.APPROVE_OPTION) {
              file = fc.getSelectedFile();
        public static File getFile() {
          return file;
    }I know I should split this out and I will sometime, but for now, this is the way the code is.
    I think the reason that nothing is coming up is that all my work is done in jbInit(). I don't want to post that code, but I will if needed. So, if I can only call it once, then how do I get the rest of it to run? Maybe I am going about this all wrong. But if it is not in jbInit(), then how does it get called? I guess now, I am confused.
    Thanks for the help.
    Allyson

  • When I attempt to open a PDF file I saved from a website, I get the message "There was an error opening this document. The file is damaged and could not be repaired." Is there any way to correct this problem?

    When I attempt to open a PDF file I saved from a website using Safari, I get the message "There was an error opening this document. The file is damaged and could not be repaired." When I save the same PDF file using FireFox it opens up immediately. Is there any way to correct this problem with Safari?

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • With OSX10.7.5 and Adobe Reader 11.0.02 when I try to open a PDF downloaded from the web I get 'There was an error opening this document. This file is damaged and could not be repaired. Preview will not open either. Older PDFs OK.

    I am running OS X 10.7.5 and Adobe Reader 11.0.02. In the last few days I have been unable to open PDF's downloaded from the web. Reader gives the error message 'There was an error opening this document. The file is damaged and could not be repaired'. Removing Reader and trying to use Preview to open these files give the error 'Preview cannot open this file. It may be damaged or use a file format that Preview doesn't recognise' (or something like that). Downloading the same files with Reader removed from my Mac Preview opens the files OK.
    I was recently prompted to update Adobe software but did not note exactly what the update was nor when it was done.
    Reader and Preview will both open PDFs I downloaded a week ago. Reader will also open files downloaded on another Mac running OS X 10.0.0 and copied to my Mac. Any ideas?

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present.
    If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Hi, I cant open a document I have been working on. It has previously been saved without a problem now all I get is a box stating that the file cannot be opened. Any suggestions please?

    Hi, I reecntly purchased a Mac and the Pages App. But now I find that I cant open a document I have been working on. It has previously been saved without a problem now all I get is a box stating that the file cannot be opened. It is visible in both the Pages Windows and under Recent Items but just will not open. Any suggestions please?

    Hi Colourdoodles,
    Maybe the document is corrupted. Can you open other Pages documents? Preview may open it. Right click (or control click) on the document in Finder and Open With > Preview.
    If that works, Edit > Select All, Edit > Copy. Then paste into a blank Pages document. Formatting may be messed up, but you will have editable text. Then Save (with a different name), close and see if you can open the new document.
    Regards,
    Ian

  • Cannot open Pages documents that I've worked on.  I open a new document, work on it, then save and close it.  When I try to open the document again, I get the following message: The document "[name]" could not be opened. The file isn't in the correct form

    I cannot open Pages documents that I have worked on and saved.  When I try to reopen Pages documents that I've saved, I get the following
    message:
    "The document “[name of document]” could not be opened. The file isn’t in the correct format.
    The file might be corrupted, truncated, or in an unexpected format."
    I have downloaded the latest update to iWork, but that doesn't help.
    I use Mac OSX 10.6.7
    I am using Pages '09 version 4.0.5 (852)
    If anyone can help, I would greatly appreciate it.
    Best regards,
    New York Mac User

    A few general trouble shooting tips that may apply here:
    1. If you used Software Update to do the OS update(s) to reach 10.6.7, go to http://support.apple.com/downloads/ and download and apply the Mac OS v10.6.7 Combo Updater. The Combo Updater contains some fixes that were not included in the incremental updaters used by Software Update.
    1a. Check that you have the current version of Pages (and of the other iWork applications) installed. All three applications' current version numbers end in .0.5
    2. A common cause of malfunctioning applications is a corrupted preferences file (.plist file). Your Pages '09's plist is at yourname > Library > Preferences > com.apple.iWork.pages.plist
    Quit Pages, locate the file and Drag it to the Desktop (or to the Trash).
    Restart Pages and attempt to open one of the files.
    If all is well, Trash the plist file and empty the Trash.
    If there's no change, AND you've made changes to the Preferences that you wish to keep, drag the file back to its previous location, replacing any new one that has been created.
    Regards,
    Barry

  • Some files in "DOCUMENTS" icon in dock won't open. Get msg saying You need a newer version of Pages to open this document." Have Pages 4.1 installed.  Same files will open ok from Finder, Pages App. Recently sync'd with ipad2 (Pages) after iOS5 installed.

    Some files in "DOCUMENTS" icon in dock won't open. Get msg saying "You need a newer version of Pages to open this document." Already have Pages 4.1 installed.  Same files will open ok from Finder/Pages App./selected file. Prob not noted until recently after sync'd with ipad2 (Pages) when I installed iOS5. Anyone-- please?!

    You have 2 versions of Pages on your Mac.
    Pages 5.2 is in your Applications folder.
    Pages '09/'08 is in your Applications/iWork folder.
    You are alternately opening the wrong versions.
    Pages '09/'08 can not open Pages 5 files and you will get the warning that you need a newer version.
    Pages 5.2 can open Pages '09 files but may damage/alter them. It can not open Pages '08 files at all.
    Older versions of Pages 5 can not open files from later versions of Pages 5.
    Once opened and saved in Pages 5 the Pages '09 files can not be opened in Pages '09.
    Anything that is saved to iCloud and opened in a newer version of Pages is also converted to Pages 5 files.
    All Pages files no matter what version and incompatibility have the same extension .pages.
    Pages 5 files are now only compatible with themselves on a very restricted set of hardware, software and Operating Systems and will not transfer correctly on any other server software than iCloud.
    Apple has removed almost 100 features from Pages 5 and added many bugs:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=3527487677f0c 6fa05b6297cd00f8eb9&mforum=iworktipsntrick
    Rate/review Pages 5.2 in the App Store.
    Peter

Maybe you are looking for

  • Button not appearing where I think it should.

    Good afternoon all, I wonder if anyone can help me with this please?  I think it is probably due to a float being in place but I am not sure how to rectify this.  I can normally find the answers to questions I have by googling but this is specific to

  • Display has a yellow hue/tint...

    My display has a yellow hue/tint and it is not being caused by a screen protector (which is clear). Also did a factory reset (didn't expect it to work) and it didn't help. I'm comparing the display to a at&t iphone 4 display. The hue/tint is consiste

  • Excise New Scenario

    Hi, I import a material Suppose X. It cost me 100 Rs now vender is not importer but he is middle man and raise a Amount 20 Rs as his commision. Cost of material is 120 for me but i can take input benefit of 100 Rs becoz of cost of material is 100 Rs.

  • Checking SAP notes on Solution Manager

    Hi... I need to get a report with all the SAP notes applied in my ERP environment. If I use tx code snote, on ERP, I can find this, but I need something on Solution Manager, like a report... What can I do?! Thank's in advance.

  • Trying to configure my printer for NeatWorks... I need the device software to configure the scanner

    Hello. I have a (CM741A) Officejet 6500 E709n and wanted to use it for my Neat app on my Macbook Pro. Currently using Mavericks OS X 10.9.1 Problem is, I wanted to configure it based on a set of instructions (see link), but I cant seem find the HP So