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

Similar Messages

  • WebUtil within Oracle Forms (Find File - Open File Dialog Window)

    I have successfully configured WebUtil and I can successfully execute the functions. I have been working with PKG_FIND_FILE.Selection function (which displays an Open File Dialog Window).
    I cannot figure out why the following is occurring:
    When I call the above function, the system typically displays an older dialog window (light blue / gray) window. For a brief time, we were able to bring up the "Windows looking" dialog window. I don't know what we changed in the configuration, but it is now back to the older looking light blue/gray dialog window.
    Any ideas on where in the configuration, this would cause the dialog window to switch its "look and feel"
    Thanks,
    Mike

    File dialog look has been changed because of the java version difference.
    In Java 1.4 the look is different and 1.5 shows another way.
    So check which java plugin and the version of the java
    ( go to control panel->settings -> click on java and check on version)
    Rajesh ALex

  • Open File dialog window when setting the value of a path type input argument in a VI call

    Hi,
    I am new to TestStand (running 4.0) and I want to create a sequence of VIs to turn on, setup and measure a device. One of my VIs sends a configuration file to my device. An input argument to this VI is the path of the config file. I would like to make it simple to modify this path when setting up the sequence by popping up the File Open dialog window and choose my file. Is this possible? I do not want to manually change the file during execution, just to have multiple calls of one VI, each call opening a different file according to the path given to it during the setup. 
    So far I have only succeeded in manually entering the absolute path each time I add this step. What makes it even more annoying is the fact that LabVIEW interprets the path with the escape codes, rendering the path unusable. Manually adding a 2nd backslash at each '\' occurence adds another step to the process. I tried both String and Path type of inputs, and the SearchandReplace() or ToUpper() (trying to bypass the escape codes) functions in TestStand don't seem to help m.
    Your help is very much appreciated,
    Fred

    Eudaemonic,
    If you want to create a series of easy to configure step types so others can develop sequence files easily, you could use custom step types. When you create a custom step type you implement your own configuration dialog. Since you have control over what controls you expose in your configuration dialog, you can design it so the desired path is selected using a open file dialog. Refer to chapter 13 of the TestStand reference manual for more information about custom step types.
    If you do not want to create a custom step type but you still want to give access to your sequence developers to pre-configured steps, you can use templates. A step template is a snapshot of a step that you can reuse later. Let's assume that instead of asking your users to edit the step to enter the desired path, you create several step templates with different pre-configured paths and based on their applications requirements they could use the appropriate template. Refer to the NI TestStand Help for more information about the Templates list on the Insertion Palette.  
    Hope it helps.
    Antonio Lie. 

  • Printing multiple PDF files in Windows 7 at once

    When I had Windows XP I could select multiple pdf files in their folder then right click to print.  With Windows 7 this option is no longer there. I have searched everywhere for a solution to this problem.  I am not sure why Adobe (or Microsoft) took this option away.  I have to print 30 to 40 invoices a day.  I now currently have to open each individual document, print, close, and move on to the next.  This is quite cumbersome.  If anyone knows of a way around this I would appreciate the help. 
    If no solution is available does Abode know of the situation? 

    your right.  I am using Acrobat.  didn't even know I had it. I've been bugging the IT guy for Acrobat for a while.  I have no idea how long it's been installed.  I had just bugged him again last week.
    reader is still set as my default.  without even realizing it, i've only been using acrobat to combine and print large files.
    the only way to combine pdf's in reader is to use Adobe's online service which you have to pay for.
    I'm sure there's some third party software out there.    I use bluebeam to mark up pdf's.  it's free.
    don't know if it can be used to print or combine multiple files.  never tried.
    the method of dragging and dropping pdf files into the printer window does work with reader. (I checked)
    As I said, it prints the documents out of order which can be a pain.
    I found this discussion because I was searching for a way to get the documents to print in order.  Haven't found one......yet.

  • Bridge Opens files using Windows Photo viewer - not Photoshop CC.  How do I change default?

    Bridge opens image files using Windows Photo viwer - not Photoshop CC.  This is an utterly useless default setting.  How do I get Bridge to open a file in Photoshop?

    Edit/preferences/file type association.  Set extensions to prefered default.

  • Mixing multiple audio files using Windows Azure Media Services

    Hi,
    I'm trying to "mix" multiple audio files on the server, e.g. I have 4 different .wav files for each instrument in my song: vocals, guitar, drums, bass.  I want to create a new stereo "mix" from these, but I want to change the relative
    volume of one of the tracks, say vocals, or mute it altogether.  I can use libraries such as NAudio to achieve this, but I'm wondering if Windows Media Services can do this, and if so, can it do it dynamically, i.e. create a live stereo stream and allow
    me to add/drop individual tracks on-the-fly.  I've been looking through documentation on Azure Media Services and Expression Encoder, but haven't found the answer.
    Thanks,
    Alan

    Hi Georgios,
    There is support for using audio overlays in our service - see http://azure.microsoft.com/blog/2014/08/21/advanced-encoding-features-in-azure-media-encoder/ for examples. It may be possible to perform pairwise overlays to implement your scenario.
    However, it's currently not possible for us to integrate customer-built processor code into our service.
    Cheers,
    Azure Media Services team

  • Open file-download window from servlet

    Hi all,
              This is the scenario I'm trying to achieve:
              - Display html page with a button or href "download csv file"
              - the user clicks
              - the file-download pop-up window should appear,so the user can save the
              file at any location
              This is how far I get:
              - when the user clicks a servlet gets activated
              - Servlet:
              - creates the csv file and write it to disk
              - now I want the servlet to do something so that the file-download window
              opens
              - I've tried with forward the request to the url (which only displays the
              content in the browser)
              - I write to HttpServletResponse it opens the file in excel which I don't
              want
              Any ideas ?
              Thanks in advance
              Per
              

    Thanks Mettu,
              that worked fine.
              This is what the code looked like:
              ...Per
              ==========================================================================
              if (nextPage.getType()== Page.TYPE_CSV)
              String filePath = (String) req.getAttribute(Attribute.CSV_FILE_PATH);
              String fileName = (String)
              req.getAttribute(Attribute.CSV_FILE_NAME);
              file://Writing text file like this enforces fileDownload popup
              window
              res.setContentType("application/RFC822");
              res.setHeader("Content-Disposition", "attachment; filename=\"" +
              fileName);
              writeFileToOutStream(res,filePath,fileName);
              private void writeFileToOutStream(HttpServletResponse res,String
              filePath,String fileName) throws IOException
              OutputStream out1 = res.getOutputStream();
              FileInputStream fin = new FileInputStream(filePath + fileName);
              byte [] b = new byte[1024];
              int size = 0;
              while((size = fin.read(b, 0, 1024)) > 0)
              out1.write(b, 0, size);
              fin.close();
              out1.flush();
              out1.close();
              ==========================================================================
              "Mettu Kumar" <[email protected]> wrote in message
              news:[email protected]...
              > Per,
              >
              > For this to work in both Netscape and IE, You need You need to set
              content
              > Type and Also a header information.
              >
              > Set Content Type As : Content-type: application/RFC822
              > set the Header "Content-Disposition" to "attachment; filename=\"" +
              > youfilename + "\""
              > Where youfilename is the name of the file you display to
              user.
              >
              > If you want the exact java code use the following two lines of code in
              your
              > servlet:
              > res.setContentType("Content-type: application/RFC822");
              > res.setHeader("Content-Disposition", "attachment; filename=\"" +
              youfilename
              > + "\"");
              >
              >
              > This should solve your problem.
              >
              >
              > Kumar.
              >
              > Per Lovdinger wrote:
              >
              > > Hi all,
              > >
              > > This is the scenario I'm trying to achieve:
              > >
              > > - Display html page with a button or href "download csv file"
              > > - the user clicks
              > > - the file-download pop-up window should appear,so the user can save
              the
              > > file at any location
              > >
              > > This is how far I get:
              > > - when the user clicks a servlet gets activated
              > > - Servlet:
              > > - creates the csv file and write it to disk
              > > - now I want the servlet to do something so that the file-download
              window
              > > opens
              > >
              > > - I've tried with forward the request to the url (which only displays
              the
              > > content in the browser)
              > > - I write to HttpServletResponse it opens the file in excel which I
              don't
              > > want
              > >
              > > Any ideas ?
              > > Thanks in advance
              > > Per
              >
              

  • Ou are working with multiple open files and wish to separate them into movable windows. Which of the following will accomplish this?

    Which of the following will exactly copy a file in Photoshop CS5?

    Which of the following will exactly copy a file in Photoshop CS5?

  • 'No date' files in Open file dialog window

    It is annoying to open recent created/modified files/folders.  They are dated as 'no dated'.
    This does not happen browsing files/folders in Finder.
    This snapshot was taken on Nov 24 and "Today" contains Nov 17 files
    And here 'No Date' files at bottom of the popup window
    Thank you

    In the Finder Toolbar (top of the window), you'll see the Arrange icon:
    (If you don't see this icon, control-click in the Toolbar, choose Customize Toolbar, and add the Arrange icon to your Finder Toolbar.)
    When you click on that, you have a choice of how you'd like items in the open folder to be arranged. If you option-click on that, you have the choice of how you'd like the arranged icons to be sorted. Depending on the Arrange-Sort combination you've selected, No Date becomes a part of the mix. Play with the Arrange and Sort possibilities to list your files more to your liking.

  • Photoshop CS3 Won't Open Files in Windows 7 64-bit

    Hi All,
    I'm running Windows 7 64-bit on my desktop. When I try to open an image file in Photoshop CS3, the program hangs and never opens it. I have attemped PSD's, JPG's, GIF's and PNG's.
    I have right-clicked on the program and selected to run it as an administrator. I have set up a compatibility profile as Windows XP SP3. I have tried both at the same time and there's been no change.
    Any thoughts how I can conquer this beast??
    Thanks!
    -Ansel

    Change the default printer to something local, and that you know is available (either a PDF print, or an attached printer).
    The most common cause of this is a remote printer that isn't available, and the driver takes it's sweet time returning.

  • Cannot open files in Windows XP with Illustrator CS4

    Hey
    I have installed the CS4 package on my PC with Windows XP sytem. Photoshop, Indesign and Acrobat works without problems. ´
    But Illustrator won't open any file. I have tried to change the parameters when saving the dokuments in Illutrator CS2, but it won't work.

    Poul,
    What happens if you DoubleClick the file(s), or use Open With, without getting Illy started first?

  • Error Opening File In Windows

    I am running the latest Raptor (Just updated from EA4) on Windows XP.
    I find that if I have a file and I right click and open with SQL Developer, the file opens OK but I get the following error message:
    "Windows cannot file C:/path_to_file. Make sure you typed the name correctly, and then try again. To search for a file, click the Start button, and then click Search".
    It does not matter if Raptor is open or not.
    Anybody else find this behavior?
    Graham

    I have had another look at this and am increasingly convinced that this is a bug. I think it may apply only to Windows computers. I am running the EA4.1 on windows XP.
    To recreate:
    - Open raptor; tools, preferences, file types.
    - Find the .sql extension and highlight.
    - Check the "open with SQL developer box"
    - OK and close raptor.
    - Find a .sql file on the hard drive, double click to open
    - Raptor will open the file fine, but you will get the error I referred to in the previous post, which you need to OK to close.
    If you then go to the .sql file, right click, open with and browse to the sqldeveloper.exe executable, and open it that way, it will open in Raptor and NOT produce the warning.
    Graham

  • Gmail in firefox won't open file selection window when adding attachments, no errors, just nothing. Chrome works fine on same computer. Firefox is up to date

    when attempting to attach files to a message using gmail there is no response. i click the paperclip icon and no windows open, no errors show, it just sits there? I can attach to messages as expected using Chrome & gmail on the same computer.
    I have shut down and restarted the computer with no change. I have current firefox [v31] and the machine is a dell desktop running Windows Vista Home Premium SP 2 build 6002.
    Thanks for your help

    Try allowing pop up windows
    Open Menu
    Options
    Content (on the top)
    Click Exceptions...
    Type mail.google.com in address of website area
    Click Allow
    Try to open attachment window now.
    Restart FireFox and try adding attachment again.

  • Problems opening files from Windows server

    Since upgrading to Leopard, some files saved on an Windows server no longer open in the correct application. For example, documents created in Quark 6.1 or 6.5 show up as Unix Executable Files and attempt to open in the terminal. Copying the file to my desktop does not help. The files work correctly for pre-Leopard Macs. New files saved from Quark 6.5 on a machine running Leopard onto the server work fine for other Leopard Macs, but pre-Leopard Macs try to open the files with Script Editor. I can change the "Open With" preferences in a get info window for individual files, but if I select "Change All", i get an error that "not enough information is available".
    Also, Photoshop EPS files created with pre CS 1 versions of Photoshop appear as Illustrator EPS files.

    I'm not sure if anyone is working on it.
    I did copy everything to the Mac running 10.3.9 (above I mistakenly said the computer I was going to copy to was running 10.4).
    I then updated the Mac to 10.5 and all the files continued to open with the proper program even after I put them back on the server.
    I know that it's a hassle, but it worked. I guess if you don't have another Mac still running 10.3, you could put everything on your server, reformat you Mac to OS 10.3.9, then copy the server to your Mac, then upgrade to 10.5. That is, if you have a large enough hard drive. I don't claim to be a Mac expert so I can't guarantee anything in this paragraph. It just seems like that would be the only logical step given what worked for me with upgrading the computer running 10.3.9. Even after doing that, I'd then do a clean install on the computer. My Mac was having problems so that's what I did and plan on doing to the other Mac when I get the chance.
    I guess it all depends how many files you have and how annoyed you are at having to Control click all your files to open them.

  • New/Open File puts window BEHIND all my tool windows - UGH.

    I'm running PS CS4/mac on a Apple 30" display and have all my tool windows set up on the left side of the screen in three columns.  When I open up a file, it is placed BEHIND my tools in the upper left hand corner so I have to keep moving it over to the right - is there a way when you open or create a new file that the window opens to the right of my tools?  Very frustrating!

    Heh! I lied, unintentionally. It all depends on how you dock your palettes. It must be done just right. Here's how.
    Notice the position of my palettes on the right in my image above (exluding the Tools bar, that's already on the left). Once I drag them left, they collapse like this:
    No good. Images will fall underneath. You have to drag the palette group until you see this:
    Let go and the palettes will snap properly docked back to the sizes I had them at on the right.
    Notice the dark gray in the blank area below the Tools palette. That's another indication the palettes are docked correctly. Done like this, images do properly stay to the right of the palettes.

Maybe you are looking for