Problem to set the path of browser button in a textbox in JSF

Hai guys I have a page which has a textbox and a command button. When I click the command button, a save dialogue box opens through which I can navigate to only DIRECTORIES and save my content. Therefore in the backend bean I have used a JFileChooser to invoke, I get the folder path, now my problem is to place this path into the textbox. How can I do that?
I have used the fileUpload tag but in this it select only the files but not the folder? Can anyone suggest me the solution?

AsishAnandAsha wrote:
Hai guys I have a page which has a textbox and a command button. When I click the command button, a save dialogue box opens through which I can navigate to only DIRECTORIES and save my content. Not possible with HTML and thus also not with JSF.
Therefore in the backend bean I have used a JFileChooser to invoke, I get the folder path, now my problem is to place this path into the textbox. How can I do that? Java runs at the server side, so also Swing components. The client will only see the JFileChooser if it runs at the same machine as where the server runs. Which wouldn't occur in real world.
I have used the fileUpload tag but in this it select only the files but not the folder? Can anyone suggest me the solution?This is not possible with HTML or any other client side code. As JSF just wraps and renders HTML, it can also do nothing for you. Best what you can do is to write a signed applet or Web Start application which can select directories and send it to the server side.

Similar Messages

  • How to set the PATH in Terminal?

    As a newbie to Bash and the Terminal, in connection with installing a new version of Ruby and various add-ons, I have been messing around with changing the PATH via various methods I've found on the internet, and trying to add a new directory to my PATH. Unfortunately, I cannot figure out how to set the PATH correctly. Here is what I understand so far:
    1. Bash first looks to ".bash_profile" in the home directory for PATH settings.
    2. If none, Bash then looks to ".bash_login" for PATH settings.
    3. If none, Bash then looks to ".profile".
    4. If none, Bash then looks to a system file in "/etc/profile" for default PATH settings.
    5. For a new shell after login, Bash looks for a ".bashrc" file.
    I cannot find any of the above files (I have Finder set to show hidden files already). Somehow, following some instructions from the internet without really knowing what I was doing over the past week I have set my PATH as follows:
    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/*****/src:/usr/X11/bin
    but I cannot find the file that is setting this PATH. I have tried creating a new ".bash_profile" shell file and putting it in various places such as "/bin" and "/usr/bin" but the file is not being read.
    * As a temporary workaround I tried using the command "source .bash_profile" upon login to set the PATH using the .bash_profile file that I created, but it does not work.
    * I am able to temporarily alter the path using the command "PATH=/usr/local/bin:$PATH" but this only lasts for an active shell; when I close out and reopen a new shell, it reverts to the default.
    So my questions are:
    Is it correct that there is a "/etc/profile" somewhere that is setting the default PATH? If so where is it? Should I alter it, or create a new ".bash_profile" somewhere to set the PATH? If not, where is my PATH being set? If I should create a new ".bash_profile", what exactly should go in it?
    Thanks in advance for any assistance.

    ... I created a new ".bash_profile" file directly under my home directory and it worked like a charm. Below is the content of the file:
    "PATH=/usr/local/bin:/bin/:/sbin/:/usr/bin/:/usr/sbin/:/Users/******/Ruby:/Users/*******/src:/Users/******/Java Programs/"
    What are the "..."'s? Is that just you, or is the contents of the file actually inside of double quotes?
    is there an 'export PATH' also in the file? As in
    PATH=/usr/local/bin:/bin/:/sbin/:/usr/bin/:/usr/sbin/:/Users/******/Ruby:/Users/*******/src:/Users/******/Java Programs/
    export PATH
    And did you either restart your Terminal session so your .bash_profile was read, or issue a 'source .bash_profile' command to execute the .bash_profile after your change?
    The only remaining problem is that from the home directory, I'm unable to directly run programs in the above-designated subdirectories (without first navigating to the subdirectory containing the file. Is there something wrong with the syntax or order of the directories I put in the path?
    For example: there is a file called "newprogram.rb" in the "Ruby" directory listed above. I should be able to execute it from the home directory using "ruby newprogram.rb" but it does not work. The same command works fine from within the "Ruby" directory.
    Does the 'ruby' command search PATH to find its scripts?
    Have you read the "man ruby" man page to see if it talks about PATH?
    A common Unix feature is that programs and scripts with the executable bit set, and are located in a PATH directory, will be run if you just type their names.
    For example, if the first line of newprogram.rb script starts with
    #!/usr/bin/ruby
    and if the script is executable
    chmod +x newprogram.rb
    And if it is in a directory in PATH, then just typing
    newprogram.rb
    should run your perl script using /usr/bin/ruby. If you want to use a different version of Ruby, then change the #! line so it point to your version of Ruby. Or if your version of Ruby is found earlier in PATH then the /usr/bin/ruby, you can use
    #!/usr/bin/env ruby
    as your script's first line which will search PATH for 'ruby' and use the first one it finds.
    Message was edited by: BobHarris

  • How to set the path variable on Windows ME?

    I want to get a friend of mine to start using java the only problem is that we both dont know how to set the path variable in Windows ME. I cant seem to find any instructions on it for ME. So if someone could please tell me how or give me a llnk to directions for Windows ME. Thanks.

    Refer to the Installation Instructions for the package that you installed - I believe #5 if the instructions has the information. A link to the instructions is at the page you installed from.

  • When i'm in netflix the back to browser button dose no work in 4.0 CR

    both at the end of a movie or while watching a movie the back to browser button in Netflix dose nothing but as for the speed i have noticed a real drop in CPU usage in other browsers my CPU runs at%100 all the time 4.0 it's about%70

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode

  • Where i can set the path to retreive the Km files

    Hello All,
    How to access the KM content files in my portal Application. Where I can set the path to retrieve any file from KM. Please  can any one help me.
    Thanks in Advance

    hi
    I am using the Following code. it gives error.i think i need to import some jar file. can you help which jar file to import and where i can find those jar files.
    Thanks in Advance.
    import com.sapportals.portal.prt.component.*;
    import com.sapportals.portal.prt.resource.IResource;
    import com.sapportals.portal.prt.resource.IResource.*;
    import com.sapportals.portal.security.*;
    import com.sapportals.portal.security.usermanagement.*;
    public class test extends AbstractPortalComponent
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
              //IUser user = WPUMFactory.getUserFactory().getEP5User(request.getUser());
              com.sapportals.portal.security.usermanagement.IUser user = null ;
              IResource resourceContext = new ResourceContext(user);
              RID rid = RID.getRID("http://epd.symbol.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.webdav/symbol_productinfo2/cs1504/images");
              try {
                IResource resource = ResourceFactory.getInstance()
                                          .getResource(rid, resourceContext);
                if( resource != null ) {
                   // resource found
                   System.out.println("resource " + resource.getRID() + " found");
                } else {
                   // resource not found
                   System.out.println("resource " + resource.getRID() + " does not exist");
              catch( Exception e ) {
                // problem while retrieving the resource
                System.out.println(
                                       "exception while trying to get resource " + e.getRID()
                                       + ": " + e.getMessage()

  • Unable to set the path

    I have installed J2SDK1.2.1 & JDK1.3.0_02 in my system.I have declared the path in the environment variableslike this
    Variable Value
    Java I:\jdk1.2.0_02\bin;I:\j2sdkee1.2.1\bin
    Classpath I:\jdk1.2.0_02\lib;I:\j2sdkee1.2.1\lib\j2ee.jar
    JAVA HOME I:\jdk1.3.0_02
    J2EE HOME I:\j2sdkee1.2.1
    this wont work if i open command prompt and if i type javac it gives
    'javac' is not recognized as an internal or external command,
    operable program or batch file.
    Again if i set the path in commandprompt then javac command works.And when i try to start the J2EE Server or if i try to use the DEPLOYTOOL it shows
    ERROR: Set J2EE_HOME before running this script.
    I dont know what is the problem.Is the coding that i have given is correct .Please help me out.
    Thanks in Advance
    Sriram

    Actually i have learnt core java and i am pretty good with it.but i have started learning j2ee and in my course material that i have has given the instruction for staring the server and i have given the codings as the book instruction says.But still iam not able to do it.I use win2000prof and i can an i am executing the normal java programs in my system but the problem is i need to set the path every time i open the command prompt.And the other problem is i am not able to start the j2ee server and without starting the server i am not able to practise.
    Sriram

  • Setting the path in Windows98

    Hello,
    I'd like to run my java application on a computer with Windows 98, and not in the java bin directory. I'm familiar with setting the path variables in Windows XP. You go to control panel -> System -> Advanced -> Environment Variable -> and set them as you like. In Windows 98 there seems to be no such method. Instead I'm hacking away at the autoexec.bat file, but I still can't seem to get it to work. Currently, this is what my autoexec.bat file looks like:
    REM [Header]
    @ECHO OFF
    REM [CD-ROM Drive]
    REM c:\windows\command\mscdex /d:gem001
    REM [Miscellaneous]
    REM [Display]
    REM [Sound, MIDI, or Video Capture Card]
    REM [Mouse]
    c:\windows\cwcdata\cwcdos.exe
    PATH=c:\Program Files\Java\jre1.5.0_01\bin;c:\Program Files\Java\jdk1.5.0_01\bin;
    CLASSPATH=c:\Program Files\Java\jre1.5.0_01\bin;c:\Program Files\Java\jdk1.5.0_01\bin;
    I put the path to both the JRE and JDK in both the PATH and CLASSPATH variables just to be sure. From a DOS prompt, the "java" command seems to work from anywhere, but the "javac" command still only works in the bin directory. Can any think of where I'm going wrong?

    This is copied from the installation Instructions for the product you downloaded. (Note the use of quotation marks - eithr do that or uses the 8.3 format of the directory name)
    Microsoft Windows 98 - To set the PATH permanently, open the AUTOEXEC.BAT file and add or change the PATH statement as follows:
    Start the system editor. Choose "Start", "Run" and enter sysedit, then click OK. The system editor starts up with several windows showing. Go to the window that is displaying AUTOEXEC.BAT
    Look for the PATH statement. (If you don't have one, add one.) If you're not sure where to add the path, add it to the right end of the PATH. For example, in the following PATH statement, we have added the bin directory at the right end:
    PATH C:\WINDOWS;C:\WINDOWS\COMMAND;"C:\PROGRAM FILES\JAVA\JDK1.5.0_<version>\BIN"
    Capitalization doesn't matter. The PATH can be a series of directories separated by semi-colons (;). Microsoft Windows searches for programs in the PATH directories in order, from left to right. You should only have one bin directory for a JDK in the path at a time (those following the first are ignored), so if one is already present, you can update it to jdk1.5.0_<version>.
    To make the path take effect in the current Command Prompt window, execute the following:
    C:> c:\autoexec.bat
    To find out the current value of your PATH, to see if it took effect, at the command prompt, type:
    C:> path

  • Problem in setting the smtp in a apple mail account.

    Can anyone help me resolve a problem in setting the mail preferrences? I have multiple email accounts and the smtp address is being deleted to a none smtp in an account then when I fix the problem in one account it deletes an smtp address in another email account. When I fix that account it deletd another smtp address and so on an so forth. Is this a virus or is there a fix for this problem?

    Mail in IOS iPhone or OS X?
    Anyway You select each account and assign or create new smtp.

  • Error when setting the path in KAWA IDE Help !!

    I am using SDK 1.4 and KAWA IDE .. when i set the path ... it showing an error message...also when i complile it shows correct the bin ,lib settings wht i do....... help me...

    thnks replysssss i got corrected by mine itself
    thnks

  • Set the path and class path in windows xp professional

    hi guys....could any one tell me step by step on how to set the path and classpath on windows xp professioanl? This is my path and classpath
    set path = %path%;C:\jdk1.3.1_02\bin;c:\JOpen672.jar;c:\
    set CLASSPATH = c:\j2sdkee1.3.1\lib\j2ee.jar;c:\JOpen672.Jar;c:\;c:\postgresql.jar;c:\jai_core.jar
    not working please help me on this thanks alot.
    novicepro

    Below is a Helloworld program, copy and paste it into your editor and save it as "HelloWorld.java" Use capitalization, Java is case-sensitive. If you're using Notepad, quote the name when saving, otherwise Notepad adds ".txt" to the name. Go to DOS and check that you've got the file where you want it and that it's named correctly.
    ----------program HelloWorld.java--------------
    public class HelloWorld {
    public static void main (String[] args) {
    System.out.println("Hello World!");
    In the same directory as HelloWorld.java, enter "javac" - the program should print out a list of options, if not, set your PATH - see below.
    In the same directory as HelloWorld.java, enter "javac HelloWorld.java" and the javac compiler will create HelloWorld.class. If it was successful it will not give any messages. Check that the file is created.
    In the same directory as HelloWorld.java, enter "java -cp . HelloWorld" with the spaces and the period. The program will run.
    Here is additional information:
    The Path is a set of pointers that Windows uses to locate programs that you execute, like javac.exe and java.exe. This setting is explained here:
    http://java.sun.com/j2se/1.4/install-windows.html
    Scroll down to: 5. Update the PATH variable
    (you should have already done this as part of the s/w installation)
    The CLASSPATH is another set of pointers that is used by Java to find the files that you create and want compiled and/or run. This setting is explained here:
    Setting the Classpath:
    http://java.sun.com/j2se/1.4/docs/tooldocs/windows/classpath.html
    [NOTE: always start your classpath with ".;" which means the current directory. See my classpath, below]
    How Classes are Found:
    http://java.sun.com/j2se/1.4/docs/tooldocs/findingclasses.html
    Examples:
    This is my path
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\BATCH;C:\J2SDK1.4.0_01\BIN;C:\PROGRA~1\UTILIT~1;C:\PROGRA~1\WIN98RK
    This is my classpath
    CLASSPATH=.;C:\mjava;C:\mnrx;C:\NetRexx\lib\NetRexxC.jar;C:\j2sdk1.4.0_1\lib\tools.jar;C:\NetRexx\NrxRedBk

  • To set the path

    Hi everyone,
    I am in the starting stage of java & i want to know how to set the path for java..i tried it but it giving an error ,so can please help me out in this..
    shubha

    Goto:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
    Here you will find instructions on setting the path among other info. Bad form using a Goto but I just cant resist :)

  • Set the PATH permanently windows vista 32-bit

    I need to set the PATH variable permanently for running JDK without specify the full path to the executable every time with windows vista 32-bit but I don't know how to do it. Someone can help me?
    I tried what this site said but it doesn't work (or I do it wrong)
    http://java.sun.com/j2se/1.5.0/install-windows.html

    hi,
    via setting environment variables
    steps for windows 2000, but you to try the same in vista also, may be steps only differ,
    place your cursor on my computer -> right click -> properties -> advance -> environment variables -> system variable -> path->edit
    add " ;drivename:\path "
    ex:
    ;c:\jdk1.5.0\bin

  • Set the path of SAP HELP

    Friends,
            My Basis Admin want to set the path of SAP HELP which is not working currently, so will you pls. tell us the way through which my Basis friend can set the path for it.
            Thanks
    Hitz

    Hi Hitesh,
    Refer to the link
    <a href="http://www.sap-basis-abap.com/sapbs028.htm">http://www.sap-basis-abap.com/sapbs028.htm</a>
    Hope it helps...
    Lokesh
    pls. reward appropriate points by clicking the stars on the left side

  • How to force the File Path Control Browser button to the RT Target instead of the host machine?

    I am building an application on a RT PXI system, and for one of the functions I would like the user to be able to use the browser button of the File Path Control to choose a directory on the PXI. However the browser button seems to only want open a file on the host PC, even though the application is fully deployed on the target. Note that I am controlling the PXI from a host PC.
    If anyone has any suggestions that would be great. Thanks.

    Hi,
    Unfortunately, there is not a VI to do this. Are you browsing to these files from your host VI? In order to access the files on your PXI RT target, you'll need to FTP in and browse to them that way. You could programmatically do this, but there is not a simple VI to do so.
    Amanda Howard
    Americas Services and Support Recruiting Manager
    National Instruments

  • Getting the entire file path using "Browse button"

    Hi All,
    I searched the forum for the solution, but did not find it there.
    I am using JFileChooser to browse and select a file.
    then i have to pass this file as and argument to another java program where it reads the file and sends it to the server.
    Now what i actually want is, when the file is selected i want to get the file nam along with the path i.e. C:/temp/temp.doc
    instead i am getting only temp.doc.
    I tried setting the JFileChooser mode as DIRECTORIES_ONLY. But that gives me only C:/temp and not the file name.
    If i set it as FILES_AND_DIRECTORIES it again gives me only the file name and not the path.
    pls. help me. its urgent.
    thanks

    What is wrong with JFileChooser.getSelectedFile()? From the returned File object you can get the canonical name which sounds to be what you want.

Maybe you are looking for

  • Nokia Connectivity Analyzer tool

    Nokia Betalabs has released experimental Qt based application for Symbian phones called Nokia Connectivity Analyzer. This can be really useful and powerful tool when trying solve WLAN or IP connectivity related problems, like e.g.  "invalid server na

  • Error in importing an idoc

    hi friends, i am new to xi.when importing an idoc say from ecc5 to xi for a file to idoc scenario,I am getting this message-'System ECC is running on the specified application server. However, source system sapecc50 is specified in software component

  • Business Intelligence SDK

    In which forum Business Intelligence SDK Application Development questions should be posted? Can you send me the link, please?

  • Front panel USB - Where to hook up?

    I've just put together a system using the 845GE Max M/B. I would like to make use of the front panel USB ports on the case, but can't figure where to plug them in. I'm using the USB 2 card, and there's another USB jack on the M/b... Any ideas? Thanks

  • A query on the  charge codes

    Currently we are using terminologies "Sender" and "Receiver" for the charge codes in Duet. Is it OK if we replace the terms Sender and Receiver with the following. Sender: Debited from Receiver: Credited to Are these new terminologies OK in the FICO.