• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Folder Browser Dialog on a button click

 
Greenhorn
Posts: 11
MyEclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm working on this project where we display folders under certain base-folder.

I want to implement the move a file functionality where user selects a file in a folder and clicks the move button shold display a "folder browser dialog".
Once selected a folder, move to the file to that folder. (Note this is all Folders from Server not from the client desktop)

Any ideas are welcome. (Searched for Jquery and what not...)

Also, i'd like to know if we can open a Folder Browser dialog using java script and System.Windows.Form.

Please advise.

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Of course not. Pages in a browser have no direct access to the file system on either the server or the client. Imagine the security implications if they did.

If you want to expose the server file system to the client, you'll need to use Java file I/O to obtain the information and create a page that represents it.

Or, if you are completely focused on Windows and IE (as your post seems to insinuate) there may be ActiveX or other proprietary means to accomplish this. But that has nothing at all to do with JSP.
 
Bharath Kumar Alapati
Greenhorn
Posts: 11
MyEclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I do agree with you, that displaying the server file system is a bad idea from a security perspective.
But my requirement asks for it, and i can't help them understand the implications.

Anyways,
I've a page that displays the server folders (lets say only from /var/temp/ as root folder ), and a little bit functionality that i've added like create a folder, upload a file to the current folder using apache commons library, delete a file and delete a folder.

But not sure how to implement move functionality.

This is not a Windows application, and my dev env is Java, JSP, servlets, tomcat.

I've a jquery plugin (jquery file tree plugin) that can display server folders but not sure what container i should use to display it.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Most of the jQuery tree plugins I've seen support some sort of drag and drop. Or you can use jQuery UI to add it yourself. Use the drop event to send an Ajax request to the server with the info necessary to move the file.

You might want to also explore the results of search for jQuery file browser to see if anyone has already solved the problems for you.
 
Who among you feels worthy enough to be my best friend? Test 1 is to read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic