Browse directory structure using JSF

Hello again....
I am facing a problem with my program. I am trying to open a browse directory window when i click on a button in a jsp page.... Is there any way to do it in JSF?????
regards
Junaid

We use the myfaces tag x:inputFileUpload. Check it out...you'll need to do so by example, though. Their documentation sucks, and they know it. They just point you to the examples.

Similar Messages

  • Copying complete directory structure using java.io.File

    Is there a solution to problem when you want to copy a complete directory structure using java.io.File class as you can copy when using FTP connection.

    Is there a solution to problem when you want to copy
    a complete directory structure using java.io.File
    class as you can copy when using FTP connection.FTP does not have a command to transfer all the files in a directory. FTP clients implement this by invoking single file transfer for each file in a directory.

  • Help me out with Directory structure for JSF+SPRING+HIBERNATE Project

    Hi frnds ,
    My name is Walter working for a startup software company . We are working on Hospital Management System (HMS) project .. MVC Architecture ...using Hibernate Spring and JSF ..we need to design Directory Structure for our project..
    plzz help me friends in suggesting MVC Directory structure ...? also plzz help me by directing me with the navigation flow?
    Thnxx in advance
    Regards
    Walter

    Thank you so much .. friends ..for your kind replies..thanks to Illu, anguquga and special thanks to BalusC for giving me the advice for hiring EE Artitech ..
    Anyways I have discussed with my teammates designing the directory structure
    anguquga your directory structure is close to what I have designed ..referiing to a sample application on web..
    Hospital Management system MVC architecture Directory structure
    This is the way the structure goes on ..
    model --> for Hibernate as well as Spring
    View --> for JSF
    src(-)
    |
    ------(-) java
         |
         -------(-) model
              |
              ------(+) businessobject
              |
              ------(-) dao
              |
              ------(+) hibernate
              |
              ------(+) exception
              |
              ------(-) service
              |
              ------ (+) impl
              |
              ------(+) util
              (-) view
              |
              ------(+) bean
              |
              ------(+) builder
              |
              ------(+) bundle
              |
              ------(+) servicelocator
              |
              ------(+) util
              |
              ------(+) validator
    (-) Web or WebRoot
    |
    ----- (-) JSP Files�etc.,
    |
    ----- (-) META-INF
    |
         ------     (+) Images
    |
         ------     (+) Scripts ==== CSS (cascading style sheets, JavaScript files etc.,)
    |
    ----- (-) WEB-INF =========xml files web.xml, faces-config.xml etc.,
         |
         -----(-) Classes
              |
    -----(-) HMS
    |
                   ----- (+) model
                   |
                   ----- (+) view
    |
    ----- (+) lib
    I am sure you may notice few errors .. if u find any plzz reply me back.... thnxx in advance for replies...and thnxx for giving your valuable replies...
    Walter (Kaleem)

  • Populating MX:Tree with Directory Structure using PHP

    Hello,
    I have written the following php function to return the directory structure :
         public function get_dir_iterative()
              $dir = 'data';
              $exclude = array( 'cgi-bin', '.', '..' );
              $folders = '<?xml version="1.0"?>';
              $folders .= "<node label='Root' path=\"data\">";
              //$folders .= $this->getFolderRecuring("data");
              $exclude = array_flip($exclude);
              $dh = opendir($dir);
              //$stack = array($dh);
              //$level = 0;
                        //closedir(array_shift($stack));
              while(count($stack))
                   if(false !== ( $file = readdir( $stack[0] ) ) )
                        if(!isset($exclude[$file]))
                             if(is_dir($dir . '/' . $file))
                                  $dh = opendir($dir . '/' . $file);
                                  if($dh)
                                       $folders .= "<node label=\"$file\" path=\"$dir/\" isBranch=\"true\" />";
                                       array_unshift($stack, $dh);
                                       ++$level;
                             else
                                  $folders .= "<node label=\"$file\" path=\"$dir/\">";
                   else
                        closedir(array_shift($stack));
                        --$level;
              $folders .= "</node>";
              return $folders;
    When I test this function manually it returns the proper structure.
    But when I call it with help of ZendAMF there is nothing returned and the sandclock is spinning infinite ?!
    here is the flex part:
    private var fms:RemoteObject = new RemoteObject();
    protected function initFileManagerService():void
         fms.destination ='zend';
         fms.source='FileManagerService';
         fms.showBusyCursor=true;
         fms.addEventListener( FaultEvent.FAULT, faultListener);         
         fms.get_dir_iterative.addEventListener( ResultEvent.RESULT, load_result );              
         trace('FileManagerService initialized');
    public function load():void
         fms.get_dir_iterative();
         trace('Service / load');
         private function load_result( e:ResultEvent ):void
              trace('result:'+e.result)                   
    My zend setup is working, any idea what could be wrong ?

    >if you comment out the php and just return "hello" do you get it back in flex?
    Jip, thats working
    >is this line right?>fms.get_dir_iterative.addEventListener( ResultEvent.RESULT, load_result );
    Yes it is correct, thats the way you listen for a result of a specific function when using the zend framework.
    I have other projects running very good like this.
     

  • Compressing directory structure using lzma sdk (7z)

    Hi everyone!
    I'm a beginner in things like this, but I need to call some compression method to compress some directory structure. I considered using lzma sdk but I don't have any idea how to do this work with directories. Do I have to copy directory structure and compress files in these directories? How to make one archive file then?
    Oh. I'm using package SevenZip and its main method from LzmaAlone.
    Does anyone knows the idea?
    Thanks in advance...

    lzma sdk is written in java and can be used in java applications. Maybe there is someone who did something like this in the past - called methods from SevenZip package from his own project to compress directory structure, not only single file.

  • Directory structure for JSF with EJB3 injection

    I currently have a relatively simple JSF application with the following structure:
    ROOT
    |
    |--index.jsp
    |--jsp
    |     |--index.jspx
    |     |--TopMenu.jspx
    |     |--Details.jspx
    |
    |--META-INF
    |--WEB-INF
    |      |--classes
    |            |--example
    |                    |--beans
    |                    |--model
    |                    |--tags
    |      |--lib
    |      |--tlds
    |      |--web.xml
    |      |--faces-config.xmlNow, I need to add a session bean that will be injected into a JSF managed bean, but I don't know where to put it. Actually, I don't know how should a driectory structure look like for an enterprise application which envlves jsp, jsf, servlets and ejb. Can anyone give me an example or point me to a document where I can learn this?

    After further reading, I must say I'm more confused than ever before.
    I've been looking into the examples provided with Sun's Java EE tutorial and what bothers me is that the only mention of EJB in xmls was in the application.xml where EJB's JAR (along with web app's WAR) was listed as a module:
    <module>
      <web>
      <web-uri>dukesbank-war.war</web-uri>
      <context-root>/bank</context-root>
      </web>
    </module>
    <module>
      <ejb>dukesbank-ejb.jar</ejb>
    </module>,
    but what if the web app was not deployed within the same EAR, instead calling the already-deployed EJB? It would have to have a reference to it in it's web.xml, wouldn't it? But, for some reason, I could find no example for this. The only mention of EJBs within web.xml was with <ejb-ref> which seems to be meant for EJB 2 as it requires references to EJB's home and remote interfaces... So, my question would be, what element do I need to add to web.xml to be able to inject an EJB 3 through @EJB annotations, if that particular EJB has already been deployed? Do I need to add anything at all, or is the annotation itself enough (i.e. it stands as a replacement for <ejb-ref>)? Is this app server dependent?
    Also, I keep seeing that EJB injection into JSF managed beans is not supported on JBoss, but then again, I keep seeing the opposite... I really need some guidance on this...
    If I'm making no sense here, please tell me so...

  • Issues in using JSF UI:Tree tag

    Hi,
    I am trying to work with Tree Structure using JSF UI tags. In Studio Creator i just created a JSP page and designed a Tree with two nodes under it. This is what i have in the body of my jsp.
    <ui:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
    <ui:form binding="#{Page1.form1}" id="form1">
    <ui:tree binding="#{Page1.tree1}" id="tree1" style="left: 48px; top: 48px; position: absolute" text="L3">
    <ui:treeNode binding="#{Page1.treeNode1}" expanded="true" id="treeNode1" style="width: 408px" text="Tree Node 1">
    <f:facet name="image">
    <ui:image binding="#{Page1.image1}" icon="TREE_DOCUMENT" id="image1"/>
    </f:facet>
    </ui:treeNode>
    <ui:treeNode binding="#{Page1.treeNode2}" expanded="true" id="treeNode2" text="Tree Node 2">
    <f:facet name="image">
    <ui:image binding="#{Page1.image2}" icon="TREE_DOCUMENT" id="image2"/>
    </f:facet>
    </ui:treeNode>
    </ui:tree>
    </ui:form>
    </ui:body>
    But when i am trying to launch the jsp page from browser i am getting the below exception.
    com.sun.rave.web.ui.appbase.ApplicationException
    Caused by: java.lang.NullPointerException at java.io.File.(File.java:194) at com.sun.rave.web.ui.renderer.template.xml.XMLLayoutDefinitionManager.getLayoutDefinition(XMLLayoutDefinitionManager.java:142) at com.sun.rave.web.ui.component.TemplateComponentBase.getLayoutDefinition(TemplateComponentBase.java:150) at com.sun.rave.web.ui.renderer.template.TemplateRenderer.encodeBegin(TemplateRenderer.java:73) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
    Any suggestion to solve this issue would be greatly helpful.

    Now with Unified EL - JSTL and JSF tags are supposed to work on one page.
    If you want to use Unified EL you need
    1) A container that is built on Servlet 2.5 / JSP 2.1 , and example of such a container is Tomcat 6.x
    2) Probably need to upgrade to JSTL 1.2 , and JSF 1.2
    3) If you're upgrading the container to Servlet 2.5 then web.xml should conform to Servlet 2.5 version.
    4) Use correct taglib URIs for JSTL 1.2 and JSF 1.2
    Read here: Summary of new features in JSP 2.1
    http://java.sun.com/developer/technicalArticles/J2EE/jsp_21/index.html
    JSP 2.1 Technology and JSF 1.2 Technology
    http://java.sun.com/developer/community/chat/JavaLive/2004/jl1207.html
    http://java.sun.com/products/jsp/index.jsp
    Message was edited by:
    appy77

  • Directory structure and files in Oracle Application server 10g and 11g

    Hi all,
    I am doing a lab migration from 10g to 11g based on the use of JAXB. There were some directory structures used in 10g to store the JAXB jar files and some other custom jar files. I want to know the equivalent folder structures in SOA 11g server. The 10g server directories are mentioned below:-
    1.<OracleAS_Home>\webservices\lib.
    2. server.xml located at <OracleAS_Home>\j2ee\home\config in 10g. Where can I find the equivalent file to "server.xml" in 11g server?
    3. <OracleAS_Home>\bpel\system\classes\com\oracle\bpel\xml\util.
    4. <OracleAS_Home> \bpel\system\classes.

    Here are the equivalents as per best of my knowledge:
    1. <WebLogic Home>\server\lib
    For example, D:\Middleware\wls1036\wlserver_10.3\server\lib
    2. config,xml located at <Domain_Home>\config\
    For example, D:\Middleware\wls1036\user_projects\domains\ArunBaseDomain1036\config\config.xml
    3. It should be the same as 10g (instead of OracleAS_Home, it will be ORACLE_Home) if you install the BPEL product. Since, I have not installed BPEL/SOA, I am not very sure.
    4. It should be the same as 10g (instead of OracleAS_Home, it will be ORACLE_Home) if you installed the BPEL product.
    Also, I would recommend that you consider using ORACLE Smart Upgrade (JDeveloper component) to help you with the upgrade process. It exactly points out these mappings of file/directory structures AND the necessary configuration changes as well.
    If you are requirement, is only about making the library jars available to your application, then consider reading the below discussion.
    Re: XIncludeAwareParserConfiguration cannot be cast to XMLParserConfiguration
    Arun

  • How get SharePoint Library Folders and Files directory structure in to my custom web site.

    Hi,
    Actually my requirement is, I would like to pass site name and document library name as a parameter and get a folders and files from the document library and form the directory structure by using Treeview control in my web site.
    How should i get? Using Web service / object model?
    Web service would return the dataset as a result so from that how could i form the directory structure using Treeview control.
    I will select specified files and folders then i ll update sharepoint document library columns for corresponding selected files.
    Can anyone help over this, that would be great appreciate.
    Thanks in Advance.
    Poomani Sankaran

    Hello,
    Here is the code to iterate through sites and lists:
    //iterate through sites and lists
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using (SPSite site = new SPSite(webUrl)) {
    using (SPWeb oWebsite = site.OpenWeb())
    SPListCollection collList = oWebsite.Lists;
    foreach (SPList oList in collList)
    {//your code goes here }
    Then use RecursiveAll to get all files and folders.
    http://www.codeproject.com/Articles/116138/Programatically-Copy-and-Check-In-a-Full-Directory
    http://sharepoint.stackexchange.com/questions/48959/get-all-documents-from-a-sharepoint-document-library
    Here is the full code:
    http://antoniolanaro.blogspot.in/2011/04/show-document-library-hierarchy-in-tree.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • A question regarding Directory Structure

    hi....
    can ne one tell me how to display a directory structures using JTree....
    how can i get or retrieve a directory information from a disk
    BYE

    Take a look at this. This is a complete example.
    http://manning.com/sbe/files/uts2/Chapter17html/Chapter17.htm
    You can even download the book for free. http://manning.com/sbe

  • JSF appln directory structure..

    Hi,
    Iam new to JSF. Iam using JSF with tiles..What is the exact directory structure of a JSF application containing multiple modules?
    For example, if iam having three modules mod1, mod2, mod3, then where to keep all the files related to them? where to keep the images?
    where to keep the tiles? where to place the jsf files?where to place java files? Is one faces-config.xml enough? can we keep more than one faces-config.xml files(ie one f-c.xml for one module)? please some body draw the directory structure containing the modules, tiles, jsf files.. or provide link containing the dir structure in detail for an application containing several modules...
    Thanks..

    After further reading, I must say I'm more confused than ever before.
    I've been looking into the examples provided with Sun's Java EE tutorial and what bothers me is that the only mention of EJB in xmls was in the application.xml where EJB's JAR (along with web app's WAR) was listed as a module:
    <module>
      <web>
      <web-uri>dukesbank-war.war</web-uri>
      <context-root>/bank</context-root>
      </web>
    </module>
    <module>
      <ejb>dukesbank-ejb.jar</ejb>
    </module>,
    but what if the web app was not deployed within the same EAR, instead calling the already-deployed EJB? It would have to have a reference to it in it's web.xml, wouldn't it? But, for some reason, I could find no example for this. The only mention of EJBs within web.xml was with <ejb-ref> which seems to be meant for EJB 2 as it requires references to EJB's home and remote interfaces... So, my question would be, what element do I need to add to web.xml to be able to inject an EJB 3 through @EJB annotations, if that particular EJB has already been deployed? Do I need to add anything at all, or is the annotation itself enough (i.e. it stands as a replacement for <ejb-ref>)? Is this app server dependent?
    Also, I keep seeing that EJB injection into JSF managed beans is not supported on JBoss, but then again, I keep seeing the opposite... I really need some guidance on this...
    If I'm making no sense here, please tell me so...

  • Changing file name and directory structure for use outside of iPhoto

    Hi,
    I was wondering if its possible to get iPhoto to name the files from my library to reflect the names that I've given the files in iPhoto. I'm thinking along the lines of iTunes, where its possible to chose in the preferences how the files are named, and there is some logical directory structure, such as "Artist/Album/01 - Track 1.mp3". These file names are updated to reflect any changes made in iTunes.
    I've heard the argument that I shouldn't ever want to do anything with the files themselves because iPhoto can do everything I would ever want to do, but I want to organize the files so that not all of my organizational work is lost if I decide to stop using iPhoto and transition to a different system. Any suggestions would be appreciated.
    Thanks,
    Adrian

    Adrian
    No it's not possible.
    You can rename the files before bringing them into iPhoto, you can rename them with the titles on Export (Use the File -> Export command, it gives you the option to use the title and filename) but when it's inside iPhoto you cannot rename the files.
    However, all is not entirely lost. Using Film Rolls (View -> Film Rolls) you can move pics between rolls, name rolls, create rolls and so on, as long as you do this in the iPhoto Window, and these changes will be reflected in the iPhoto Library Folder.
    If at some point you decide to chuck iPhoto then (if the new app won't read iPhoto database files) you can simply export each album you've created to a Folder (using the File -> Export command as I suggest above), this, along with exporting slideshows will preserve your organisational efforts.
    The iTunes database has a rather simple job to do: track a file and it's assorted metadata. iPhoto, on the other hand, tracks a file and it's assorted metadata, plus a Modified version, plus a thumbnail. If you consider what happens when you edit a pic, for instance - Copy Original, perform edit, save modified version, remove Original Thumbnail and then create new one - you can see it's a rather more complex job.
    Finally, the standard warning: It is strongly advised that you do not move, change or in anyway alter things in the iPhoto Library Folder as this can cause the application to fail and even lead to data loss. Any changes you make must be made in the iPhoto Window.
    Need more info? by all means post again.
    Regards
    TD

  • CDIR  is a DDIC structure  used in the IMPORT  DIRECTORY

    CDIR  is a DDIC structure  used in the IMPORT  DIRECTORY statement—my question is is it usqable for all cluster databases we make indeoendently apart from INDX or just for INDX

    I have no real details, but based on your question I am guessing Thunderbird does not check the drive letter only the path. so H:\Stuff and G:\Stuff would be the same thing. Try a change to the actual folder names.

  • Using already existing directory structure to create rolls

    I'm converting from iView into iPhoto. I have hundreds of directories titled things like 011606.SamuelWasBorn/ with subdirectories in there called /Images /FinishedImages /WebMedium /EmailSmall etc... and then plenty of .tif and .jpegs inside of those.
    I've been doing this one Cmd-Shift-I at a time, followed by a Cmd-A t select all, then a Cmd-Shift-N for a new album, followed by retyping in the name and dropping the date.
    Sigh. I'm 6 weeks into this now and still only 1/4 of the way through.
    Has anyone tried to drag and drop an entire directory structure into iPhoto's directory structure, fire up iPhoto, and have it recognize all that stuff as a whole bunch of new rolls that lack thumbnails? Would that work? Would iPhot then offer to update its thumbnails? And then would I be happy and fully integrated into my new iPhoto life?
    I'm just a bit too chicken to give it a try. If nobody's tried this before, I'll create a test library and give it a go, but if someone has experience with doing this, I'd appreciate any pointers.
    Thanks.
    Oren

    Oren:
    Welcome to the Apple Discussions. iPhoto creates a roll with the same name for any folder of image files that are imported into it. All you have to do is select your folders of source files and drag them into iPhoto's open window.
    If you want to use iPhoto's alias feature you can keep your current source folders and drag them into a library that's setup to not copy the files into it but use alias files. The library works as a conventional library with the exception that if you delete a photo from the library it does not delete the source file. That must be done manually via the Finder. I've created some Tutorials to assist users to convert over to an alias based system or go to an iView based one.
    I use iView as my primary image management and iPhoto's alias feature to create a library of the same source files. That way I have the best of both applications. Also, when using the alias method, the importing process is much faster. Good luck.

  • Directory structure in trash folder using cmsdk

    Hello forum community!
    We are using cmsdk to manage files online and have a problem with trash folder . If someone deletes whole directory, all structures are gone (only “flat files” are shown in trash) .Is there a possibility to show whole directory structures in the trash folder?
    Is this a configuration promlem ?
    regards,
    krystian

    Hello,
    Yes I mean the deleted Document.
    Let’s say I have a workspace with 3 folders (folder1, folder2, folder3). In every folder there are 3 docs folder1_doc1.doc, folder1_doc2.doc, in folder2 folder2_doc1.doc ...
    Now I delete folder1. I see in the trash of the workspace just the deleted files (folder1_doc1.doc...) without directory structure.
    What I want is to have a possibility do recover whole directory structure (folder1 including folder1_doc1.doc...).
    I hope it's clear now :-)
    Regards
    Krystian

Maybe you are looking for

  • Help with limitations in a Canvas

    Hi! I'm having some troubles with the limitations of the Canvas, the thing is that i have an array with photos and i show them like the ipod does, the things is that i want to limit the size of the canvas or something, because the images slip outside

  • MBP Keyboard equivalents for PC Keys?

    Not sure where to post this question (OSX or here) so here goes for starters. Are there standard MBP keyboard combinations that perform the functions of certain 101-key dedicated keys? Such as PageUp/Down, Home/End, (PC) CTRL+Home, CTRL+End, etc? I f

  • So, how do I unhide and subsequently delete songs from iCloud? (help...)

    I have been trying to sort my 25k+ library in the last few weeks (1243 purchaced from iTunes store and approx. 23,000 from my 20-years collection). After I managed to bring it to a healthy status it terms of artist name, song title, genre, album etc.

  • Buttton and refresh problems

    Hi!!! When I refresh a mainpage from a popuppage by javaScript, if a mainpage has a button, this button is clicked automatically and button_action() function executed. I don't want to do this automatically. Why happened this?? How can I resolve this

  • ITunes 8.1.1.10 and Windows XP - seizing up? Keeps freezing one me..

    Should I be expecting problems using iTunes 8.1.1.10 and 32-bit XP? I have always found iTunes stable as anything and championed it, but having updated today, the thing seems to freeze after a few minutes at most. Windows task manager then suggests i