How to set the initial path of a Select File dialog.

I'm using the Flex3 File.browseForOpen() method.  I'm opening a xml file; but I want to seed a path to the open dialog so used don't have to do much file navigation.   Is there a way to specify a path that the file browser starts in?
Thanks.
-Hays

Answering my own question.
var file:File = File.desktopDirectory; //this is the initial dirrectory as long as it's valid
file:File.addEventListener(Event.SELECT, newXMLSelected);
file:File.browseForOpen("XML", [new FileFilter("XML", "*.xml")]);

Similar Messages

  • How to set the Initial path in the FILE name field of a JFilechooser?

    as title
    thx...

    try this....
    File file =null;
    JFileChooser fileDemo=new JFileChooser();
    fileDemo.setCurrentDirectory(new File("e:\\test"));
    instead of "e:\\test" you can specify your path.

  • How to set the report path in a model plugin

    I am trying to figure out how to set the report path in a process model plug-in. I can seem to figure out how to get access to it. It seems like this would be a reasonable thing to do since the plug-ins are for results processing. Does anyone know how to do this? We typically use the Sequential process model but I am trying to keep my plug-in as independent of that as possible. 
    Thanks.
    Solved!
    Go to Solution.

    If I understand, you want your plug-in, when enabled, to alter the settings of any other instances of the NI report plug-in such that their reports share the same directory as your plug-in is configured to use.
    If so, your plug-in can access and modify the settings of all other plug-in instances. All instances are passed to all plug-in entries point in the plugins array sub-property of the ModelConfiguration parameter. You can iterate through this array. Any element of the array with a Base.SequenceFilename equal to "NI_ReportGenerator.seq" is an instance of the NI report plug-in. Its report options are stored in the element under PluginSpecific.Options.
    You can change the report options to what ever you want. Note that the ReportOptions model callback is called from the Initialize model-plugin entry point, so you might want to ensure that your changes are applied after that, so they aren't overwritten. To do that, you could make your changes in the the Initialize entry point of your plug-in, and ensure that your plugin runs last. To make it run last, you could set the FileGlobals.ModelPluginComponentDescription.Default.Base.RunOrder in your plug-in file to a value greater than 0, such as 1.0 (see TestStand Help>>Fundamentals>>Process Model Architecture>>Process Model Plug-in Architecture>>Structure of Plug-in Sequence Files>>Model Plug-in Entry Points>>Order of Entry Point Execution at Run Time).

  • Sun ONE Studio 4 aka Forte: How to set the output path for classes ?

    Help !
    Beginner's question:
    Sun ONE Studio 4 aka Forte:
    How to set the output path for classes ?
    As default, the class files are created in the same directory as the
    sources.
    In opposite, both JBuilder and Together support that there is a tree
    with the sources and another tree with the classes.
    The first answer I got was "not possible with Forte, but just if you write your own "ANT Build script" !
    a) Please point me to a ready-to-use ANT script for this purpose, if such is available
    b) Is using ANT instead of the MAKE as comfortable ? Besides the separation of sourcecode and classes, I would like to keep everything else to be the same, i.e. I don�t want to edit the ANT file if I enlarge the project by directories or files.
    Tia
    Sincerely
    Rolf

    You can set S1S's options to place newly created .class files in a specific location.
    Identify the compiler that is being used - Open the S1S's Tools/Options window, expand Editing and select Java Sources. Note the Default Compiler value. (If it's one if the Ant options, you use Ant to specify this option, not S1S.)
    Open the S1S's Tools/Options window, expand Building/Compiler Types and select the appropriate compiler.
    The Properties tab of the compiler has the property Target, which sets the filesystem where the compiler output is directed. If you choose <not set>, the .class files are written to their source directory.
    When you set the Target, your change affects all classes that use this compiler.
    Very few options can't be set in S1S; the challenge is finding out where they're set!

  • How to set the root path of XML document when calling Inserting procedure

    Hi,
    I was create a procedure to insert XML Document in to DBMS Tables, but i am not able to set the Start root element in calling procedure.
    My calling procedure is
    exec insXmldoc('pmc_sample.xml', 'pmc')
    When i am calling this procedure i got this error
    11:23:54 Error: ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 65
    ORA-06512: at "SCOTT.INSPROC", line 8
    ORA-06512: at line 2
    I am checking my XML file using XML Validator. My XML file was parsed with out errors.
    Please give the solution,and tell me where i did wrong in my calling procedure.
    suppose i have this XML file in local E drive ,how to set the path for that XML file in my calling procedure.

    Hi, I am doing the code likthis,please give the solution.
    SQL> create or replace procedure insProc(xmlDoc IN CLOB, tableName IN VARCHAR2) is
    2 insCtx DBMS_XMLSave.ctxType;
    3 l_ctx dbms_xmlsave.ctxtype;
    4 rows number;
    5 begin
    6 insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
    7 rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
    8 DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
    9 end;
    10 /
    Procedure created.
    SQL> begin
    2 insProc('/usr/tmp/ROWSET.xml', 'emp');
    3 end;
    4 /
    begin
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException:
    Start of root element expected.
    ORA-06512: at "SYS.DBMS_XMLSAVE", line 65
    ORA-06512: at "SCOTT.INSPROC", line 7
    ORA-06512: at line 2
    Kishore B

  • How to set the initial directory

    Using the FileChooser in JavaFX 2.0. How do you correctly set the initial directory?
    In Swing you would do the following:
    JFileChooser Choose = new JFileChooser();
    Choose.setCurrentDirectory(new File("."));But in JavaFX:
    Choose.setInitialDirectory(new File("."));does not work and causes JavaFX to bomb out when this code is triggered.
    Edited by: 863626 on 30-Oct-2011 05:30

    javafx.stage.FileChooser choose = newjavafx.stage.FileChooser();
    File d = new File(getClass().getResource(".").getFile());
    choose.setInitialDirectory(d);

  • How to set the initial Quota Planning in CRM Pipeline Performance Mgmt

    We have just installed CRM 7.0
    When I go to PPM --> Quota Planning,  all the initial figures are zeros.
    Next from top menu I click on "Generate Quota" and from the the popup I pick a sles team memeber, and I try to generate Quota
    The Err I get is
    1) "Quota plan generation failed for Michael Cutis"
    2) No quota exists for 2008 for Micahael Curtis ..... generation  for 2009 not possible"
    My question how and where do I set the initial quota value for the previous year so that I can generate quota for this year ?
    Regards,
    Surajit Roy

    Hello Surajit,
    The generate quota functionality of PPM can be used to generate quota for a fiscal based on the quota of the previous fiscal year. For example, if a rep A has been given a target of $100 for fiscal year 2009, then you can give the growth factor as 10 % and then the system can generate a quota of $110 for rep A for fiscal year 2010.
    Coming to how quota can be set up for a fiscal year manually, you can set 5 different types of quotas in the quota planning application. Total Sales Volume, Product Sales Volume, Product Category Sales Volume, Product Units and Product category untis. If you click on the one click edit button against any of the users in the actions column, system will navigate to a detailed quota planning page, where you can set all these types of targets. Alternatively, if you are just interested in Total Sales Volume Target, you can use the table view in the Quota planning page to plan the targets.
    You can refer to my blog on this topic for further information.
    /people/krantikiran.avadhanula/blog/2009/07/30/identifying-gaps-in-sales-pipeline
    Thanks and Regards,
    Kranti

  • How to set the initial value of of a poplist dynamical

    Hi,
    I've got a poplist that is populated by a recordgroup. This is done by the following pre-form trigger:
    DECLARE
         l_query_ok NUMBER;
         l_group_id RecordGroup;
         l_it_id     item;
         l_int_value VARCHAR2(2);
    BEGIN
         l_it_id := Find_item('MERGED_ISSUER.product_code');
         l_group_id := FIND_GROUP('RG_PRODUCT_CODE');
         l_query_ok := POPULATE_GROUP(l_group_id);
         -- Populate list 'Product Code'
         CLEAR_LIST (l_it_id);
         POPULATE_LIST(l_it_id,l_group_id);
    END;
    I've tried to set the initial value by adding following lines to the trigger above but I receive the frm-41084 error. This code assigns the first value of the recordgroup to a hidden text item. In the properties of the poplist the value of the hidden text field is set as initial value.
    -- Set initial value
    l_int_value := Get_Group_Char_Cell('RG_PRODUCT_CODE', 1);
    :MERGED_ISSUER.int_value := l_int_value;
    Any help?
    thx

    Hello Ken,
    you can set an initial value for a poplist with the copy command.
    You could use a procedure like this:
    PROCEDURE P_FILL_LBX
         lbx_ITEM_IN                 VARCHAR2,
         grp_DATA_GROUP_IN  VARCHAR2,
         flg_DEL_NULL              BOOLEAN,
         str_WERT_IN               VARCHAR2
    ) IS
      ERROR_ID NUMBER;
    BEGIN
      CLEAR_LIST(lbx_ITEM_IN);
      ERROR_ID := populate_group(grp_DATA_GROUP_IN);
      populate_list(lbx_ITEM_IN,grp_DATA_GROUP_IN);
      IF flg_DEL_NULL = TRUE THEN
        DELETE_LIST_ELEMENT(lbx_ITEM_IN,GET_LIST_ELEMENT_COUNT(lbx_ITEM_IN));
      END IF;
      IF str_WERT_IN IS NOT NULL THEN
        COPY(str_WERT_IN,''||lbx_ITEM_IN||'');
      END IF;
    END;Bernd

  • How to set the default path of the tag while working with xtype "tags"

    Hi,
    I am working with xtype tag, where i have to select tags in the dialog box. Everything is fine, but my requirement is set the tags path.
    Currently it is defaulted to /etc/tags and showing all the tags. Instead i have show only the single tag path that is required for me.
    Is there any way where i can set the root path and set to my custom tag path like: /ets/tags/mycustomtags/
    Thanks for the support in advance
    Riyaz

    Hi,
    Use namespaces property to set the path. But it only works with namespaces that you directly creates under /etc/tags
    so for example if you want to use or show two namesapces /ets/tags/mycustomtags & /ets/tags/mycustomtags1
    then set this property as
    namespaces       string[]             mycustomtags  
                                                       mycustomtags1
    and if you have only want to show one then
    namespaces       string[]             mycustomtags
    I hope it will help you.
    Also refer http://dev.day.com/docs/en/cq/current/widgets-api/output/CQ.tagging.TagInputField.html
    Let me know if you need more information.
    THanks,
    Pawan

  • How to set the class path?-

    my forlder is :C:\Documents and Settings\india
    jdk is in:C:\Program Files\Java\jdk1.5.0_11\bin
    can any body can help me to create a classpath for my folder?

    An alternative - as stated in reply 2 in your other thread on this topic: http://forum.java.sun.com/thread.jspa?threadID=5170470 - is not to set the CLASSPATH environment variable at all. Use the -classpath switch instead.
    As the documentation linked to in that reply points out: "The class search path (more commonly known by the shorter name, "class path") can be set using either the -classpath option when calling a JDK tool (the preferred method) or by setting the CLASSPATH environment variable. The -classpath option is preferred because you can set it individually for each application without affecting other applications and without other applications modifying its value."
    As always, the documentation is worth reading; the available command line options worth using.

  • How to Set The Initial Value of selectinputdate Component

    I set the the initial value by
    public void setSelectInputDate1(CoreSelectInputDate selectInputDate1) {
    this.selectInputDate1 = selectInputDate1;
    java.util.Date v_tarih = new java.util.Date();
    this.selectInputDate1.setValue(v_tarih);
    But when I change the value of selectinputdate and refresh the page it gives the warning
    2006-11-18 19:21:35.562 WARNING JBO-25009: 25.11.2006 19:17 oracle.jbo.domain.Date object cannot be created
    2006-11-18 19:21:35.562 WARNING java.lang.IllegalArgumentException.
    What is the reason?
    Thanks...

    Hi Turhan Tekin,
    this post may be helpful for you:
    Re: setting value of select input date adf component programmaticaly
    Regards,
    Luis R.

  • How to set the Context path to AAA/BBB in Weblogic 5.1?

    Hi folks,
              I want to deploy a web application and set the servlet context as:
              AAA/BBB. Put more simply, my application should be accessible via the
              following:
              http:localhost:7001/AAA/BBB/main.jsp
              where http://localhost:7001/AAA/BBB maps to my document root.
              One work around is to set the context to AAA:
              weblogic.httpd.webApp.AAA=WebAppLocation
              And in the deployment descriptor (web.xml) to register all servlets
              with a BBB/ prepended to the desired alias:
              <servlet-mapping>
              <servlet-name>main</servlet-name>
              <url-pattern>BBB/main.jsp</url-pattern>
              </servlet-mapping>
              But this solution does not work for me. Parts of the application refer
              the context root (AAA) and create URLs relative to that. These URLs
              will not have the BBB part. Searching for it in the code and replacing
              it is not desirable (we do not own the code). Does anyone have any
              suggestions?
              Thanks in advance,
              Musafir
              

    What you have done for changing the context root to "/" is all fine but it is important to know that there is a ROOT.war in the deploy folder of JBoss which by default gets bound to "/" context. You must be getting the error message like "Web mapping already exists for deployment" when you would be starting your JBoss server after changing your context root to "/". So either you can completely remove the ROOT.war from the deploy folder or change the context-root of ROOT.war by updating its web.xml like:
    <web-app>
    <display-name>Welcome to JBoss</display-name>
    <description>
    Welcome to JBoss
    </description>
    *<context-param>*
    *<param-name>context-root</param-name>*
    *<param-value>/jboss-root</param-value>*
    *</context-param>*
    <servlet>
    <servlet-name>Status Servlet</servlet-name>
    <servlet-class>org.jboss.web.tomcat.service.StatusServlet</servlet-class>
    </servlet>
    </web-app>
    and also update the jboss-web.xml of ROOT.war:
    <jboss-web>
    <security-domain>java:/jaas/jmx-console</security-domain>
    *<context-root>/jboss-root</context-root>*
    </jboss-web>
    I hope this serves your purpose.
    There can be a workaround also by modifying the index.html of ROOT.war in the deploy folder of your server and redirect request to your web application using meta refresh like:
    <meta http-equiv="refresh" content="0;URL='/store'">

  • How to set image source path in formsweb.cfg file in forms 11g

    Hi,
    I had written HTML code in the formsweb.cfg file in forms 11g. In the below code i am unable to retrive image file(i.e., .gif, .jpeg) from the server or local machine.
    In the below HTML code i set image source in the image tag as below:
    <img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_04.GIF"
    Is this correct path to fetch the images from the server or local machine .
    Please help me out how to set path for image in html or is there any alternate process to retrive images.
    Here is the code :
    [INDIVIDUALUAT]
    workingDirectory=D:\Aims10dev\Work
    form=LMstartup.fmx
    userid=rmenu/rmenu@RLIFEQA64
    codebase=/forms/java
    imageBase=codebase
    width=1005
    height=750
    WebUtilArchive=/forms/java/frmwebutil.jar,/forms/webutil/jacob.jar
    WebUtilLogging=off
    WebUtilLoggingDetail=normal
    WebUtilErrorMode=Alert
    WebUtilDispatchMonitorInterval=5
    WebUtilTrustInternal=true
    WebUtilMaxTransferSize=16384
    baseHTMLjinitiator=webutiljini.htm
    baseHTMLjpi=webutiljpi.htm
    archive_jini=frmall_jinit.jar,life-icons-round.jar,Agilis_Icon.jar,life_Icon.jar,personalize.jar,hyperlink.jar,amazingbutton.jar
    archive=frmall.jar
    separateFrame=False
    lookandfeel=Generic
    EndUserMonitoringURL=True
    usesdi=yes
    #HTMLbeforeForm= <table width="1005" border="0" cellspacing="0" cellpadding="0"><tr><td width="200"><img src="/forms/html/agilis-life-logo.gif" width="200" height="80" /></td><td width="10"><img src="/forms/html/agilis-life-new11_02.gif" width="36" height="80" /></td><td width="805" valign="top" background="/forms/html/agilis-life-new11_03.gif"></td></tr></td></tr></table>
    HTMLbeforeForm=<body topmargin="0" leftmargin="0" > <table width="1005" height="100" border="0" cellspacing="0" cellpadding="0"><tr><td width="200" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-logo.gif" width="200" height="80" /></td><td width="10" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_02.gif" width="36" height="80" /></td><td width="550" valign="bottom" ><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_03.gif" width="550" height="80" /></td><td valign="bottom"><table width="219" height="90" border="0" cellspacing="0" cellpadding="0"><tr><td height="36" valign="bottom" align="center"><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agile-logo.jpg" height="36"></td></tr><tr><td height="10" valign="bottom"> <div align="right"><span style="font-family:Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; text-decoration:none; color:#00000; " >Home | Change Password | Logout</span></div></td></tr><tr><td colspan="3" valign="bottom"><img src="E:\Oracle\Middleware\Oracle_FRHome1\tools\web\html\agilis-life-new11_04.GIF" width="100%" height="39" /></td></tr></table></td></tr></td></tr></table></body>

    AFAIK, this is not the correct way to set the image location.
    We call the working directory as context, so inside the context root along with WEB-INF, maintain a folder with name img and put all the images in that directory.
    You can use either .\<image_folder> or the optimum way would be (if you are using JSPs) to use getContext() method and traverse accordingly.
    FYI,,, using getContext() will give you context root directory, from there it is as simple as accessing any other folder.
    Hope this answers your question.
    Cheers,
    Jeets.

  • How to get the pull path name from a file upload window

    Hello everyone!
    I have encountered the following problem with the following JSP code:
    <form method="post" action="filename.jsp">
    Upload JAVA program:
    <input type=file size=20 name="fname" accept="java">
    <input type=submit value="go">
    </form>
    <%
    String s = "";
    if (request.getParameter("fname") != null)
    s = request.getParameter("fname")
    %>
    The value of s is alway the filename. However I want to get the full path in addition to the filename, so that I can read the file. Does anyone know how to get the pull name of the file?
    thanks a lot in advance,

    Dear Sir,
    thanks a lot for your reply. Please let me explain what I intended to do: I want to upload a file from the local machine and then read the content of the file. Therefore I need to the fullpath of the filename like /var/local/file.java instead of file.java. The latter is what I got.
    The problem I have with your code is that the function like "request.getServerScheme()" is not recognized. Maybe is it because I didn't install servelet package? I only installed javax package btw. Also my application runns on Tomcat server if this could give you some information. The error message I had is as follows:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:133: cannot resolve symbol
    symbol : method getServerScheme ()
    location: interface javax.servlet.http.HttpServletRequest
    url = request.getServerScheme()
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:136: cannot resolve symbol
    symbol : method getServerScheme ()
    location: interface javax.servlet.http.HttpServletRequest
    + ((("http".equals(request.getServerScheme()) && request.getServerPort() != 80)
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:137: cannot resolve symbol
    symbol : method getServerScheme ()
    location: interface javax.servlet.http.HttpServletRequest
    ||("https".equals(request.getServerScheme()) && request.getServerPort() != 443))
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:139: cannot resolve symbol
    symbol : method getServletConfig ()
    location: interface javax.servlet.http.HttpServletRequest
    + "/" + request.getServletConfig().getServletName()
    ^
    An error occurred at line: 36 in the jsp file: /addExercise.jsp
    Generated servlet error:
    /usr/local/jakarta-tomcat-5.0.12/work/Catalina/localhost/tutor/org/apache/jsp/addExercise_jsp.java:140: cannot resolve symbol
    symbol : variable path
    location: class org.apache.jsp.addExercise_jsp
    + "/" + path
    ^
    5 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:128)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:351)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:413)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:437)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:555)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

  • How to get the full path name of a file

    Hey everybody, I'm new here and in Java.
    so I will explain my question by giving an example:
    I want to send file from the Desktop by the "Send to" on the popup menu to my program.
    I want to know how can I read the full path name and the file name, and show it on my text box.
    Thanx alot

    If this is a client side application then I'd say look into drag-n-drop tutorials.
    i.e. drag file to your application, action listener fires, create File object giving you full name and path of users action.
    If this is a web application then look into the "multipart/form-data" content type specifications on how to upload files.
    i.e. user specifies file from <input type='file' ... /> type, submits, servlet receives data and recreates file locally on application server side.
    If you are thinking that all you need to send a file to a program is the full path and name in a textbox its a little bit more complicated then that.
    Good luck, hope that helps!

Maybe you are looking for

  • Help with creating an animated java applet...

    Hello, everyone! I'm working on a homework assignment for my Intro to Java class, and I'm having a problem I've never run into before. My assignment is to create a animated Java applet which displays an image of an alien spaceship which travels in di

  • Questions on Java Reflection in EJB

    Hi, Recently, I use reflection technology on EJB to get/set properties of a bean. We need it because we need to encapsulate data in a map to transfer data between presentation layer and business back end(i.e. the so-called value data object). A bean

  • IMG TSC

    Hi Guru,    Please tell me how to find the IMG TSC such as: VTAA. The link is: SAP IMG/SD/sales/maintain copy control for sales document/copying control:sales document to sales document .   If I only know the link,how can I find the related transacti

  • SUD-Dialog Variablen-​Rückgabe

    Hallo NI'ler, ich erstelle gerade meinen ersten SUD-Dialog mit 5 CheckBoxen. Je nach dem, welche Box nun aktiviert wurde, soll eine Variable einen anderen Wert zugewiesen bekommen. Mein bisheriger Ansatz war Sub CheckBox1_EventChange() Dim This : Set

  • How can I add an icon in the firefox toolbar to access to I.E. outlook express?

    I'd like to begin using Firefox as my default browser in place of O.E. 7. However, my Google mail account is programmed to feed e-mails to Outlook Express. I can find no way to add an icon to the Firefox toolbar to easily access Outlook Express.