Re: File Chooser dialog needed
Thanks for the response. I have a similar requirement for upload tooo. I want to make a Browse button, which accepts folder locations, and uploads all the files in that location. uploading the data from the file is fine... i can handle but how to create a button, which accepts folder locations of both client system and server system ? Jeremy Thomerson-5 wrote: You simply can't do this in web apps. You don't choose where to write something to - you don't have access to write anything to the user's computer. All you can do is give the user a file to download, and the browser will automatically ask them for what folder they want to save it to. For this, search Nabble or Google for DownloadLink. Give the user a link (DownloadLink) to a file. They click it. The browser opens your dialog for you. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Nov 7, 2008 at 11:48 AM, Shyam Narayanan shyam_naraya...@mindtree.com wrote: Thanks for your reply. My main aim of this task is to download an item into the directory user selects. So need to open a file dialog to help user choose a directory and then from it get the path user chose, so as to proceed with my download. So as you can imagine for this, i have a browse kindoff button for user to chose a directory and as it closes, need to display the path selected in a text field. The button as well as textfield stand on a wicket page. Just the action of opening a file browser is what i want. I am very new to wicket. Could you pls explain more on what i would have to do to open such a dialog nd then get the path selected ? A code example would be appreciated. Thanks From: Jeremy Thomerson [jer...@wickettraining.com] Sent: Friday, November 07, 2008 9:01 PM To: users@wicket.apache.org; shyam.naraya...@gmail.com Subject: Re: File Chooser dialog needed Swing classes are not in the same heirarchy as Wicket's and the two are not made to work together. What you need is to add an input type=file / and a FileUpload (Wicket class). However, you can't have a user just select a directory from their browser - this is a limitation of web apps. Besides, what could you possibly do with that directory path once you had it? You don't have access to their local computer Depending on what you're doing, if you really had to do something with a directory, you may have to horror-music-starts use an applet /horror-music. Hope this helps. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Nov 7, 2008 at 5:04 AM, 123shyam shyam.naraya...@gmail.com wrote: Hello, I am working on wicket. I need to open a filechooser dialog or a file open = dialog (like we have in JFileChooser). I am currently unable to implement it from my wicket page. All I want is a = file chooser dialog showing only directories , user chooses nd I get back t= he path selected. I tried to call a JFielChosser (sinwg) thorught wicket but there seems to b= e some problem, the dialog cmes in a different location first time and in t= he center of the 2nd time onwards, I guess the modality is wrong. The JFile= Chooser needs a Component object type as its parent. But I am unable to pas= s it from thewicket class. It cannot be cast to a Component or Window. Kindly help me out on this. Thanks, Shyam -- View this message in context: http://www.nabble.com/File-Chooser-dialog-needed-tp20378500p20378500.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org This message (including attachment if any) is confidential and may be privileged. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. MindTree reserves the right to monitor and review the content of all messages sent to or from MindTree e-mail address. Messages sent to or from this e-mail address may be stored on the MindTree e-mail system or else where. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e
Re: File Chooser dialog needed
Again, you can't do this in a standard HTML form. For something like this, you will need to use something like an applet. Put simply, the browser does not give you folder locations, and even if it did, your server couldn't list or grab files from the client's folder. And, the browser won't automatically upload an entire folder of anything. HTML has a file input only for files - not directories. Allowing anything different would be a big security risk. As far as letting them choose where to save it on the server - why would you do this? You can accomplish this by creating or using some sort of browse / select component, but this is typically a bad idea - why do you want to give a user access to your server file system over a webapp? It might be good to go back and look at your real requirements and evaluate what MUST be done, and then how best to accomplish it. (note - there may be certain use cases where you do need to do this, but they are very rare, and almost non-existent on a public app - which this may not be) Anyway, hope this helps. On Tue, Dec 16, 2008 at 6:26 AM, 123shyam shyam.naraya...@gmail.com wrote: Thanks for the response. I have a similar requirement for upload tooo. I want to make a Browse button, which accepts folder locations, and uploads all the files in that location. uploading the data from the file is fine... i can handle but how to create a button, which accepts folder locations of both client system and server system ? Jeremy Thomerson-5 wrote: You simply can't do this in web apps. You don't choose where to write something to - you don't have access to write anything to the user's computer. All you can do is give the user a file to download, and the browser will automatically ask them for what folder they want to save it to. For this, search Nabble or Google for DownloadLink. Give the user a link (DownloadLink) to a file. They click it. The browser opens your dialog for you. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Nov 7, 2008 at 11:48 AM, Shyam Narayanan shyam_naraya...@mindtree.com wrote: Thanks for your reply. My main aim of this task is to download an item into the directory user selects. So need to open a file dialog to help user choose a directory and then from it get the path user chose, so as to proceed with my download. So as you can imagine for this, i have a browse kindoff button for user to chose a directory and as it closes, need to display the path selected in a text field. The button as well as textfield stand on a wicket page. Just the action of opening a file browser is what i want. I am very new to wicket. Could you pls explain more on what i would have to do to open such a dialog nd then get the path selected ? A code example would be appreciated. Thanks From: Jeremy Thomerson [jer...@wickettraining.com] Sent: Friday, November 07, 2008 9:01 PM To: users@wicket.apache.org; shyam.naraya...@gmail.com Subject: Re: File Chooser dialog needed Swing classes are not in the same heirarchy as Wicket's and the two are not made to work together. What you need is to add an input type=file / and a FileUpload (Wicket class). However, you can't have a user just select a directory from their browser - this is a limitation of web apps. Besides, what could you possibly do with that directory path once you had it? You don't have access to their local computer Depending on what you're doing, if you really had to do something with a directory, you may have to horror-music-starts use an applet /horror-music. Hope this helps. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Nov 7, 2008 at 5:04 AM, 123shyam shyam.naraya...@gmail.com wrote: Hello, I am working on wicket. I need to open a filechooser dialog or a file open = dialog (like we have in JFileChooser). I am currently unable to implement it from my wicket page. All I want is a = file chooser dialog showing only directories , user chooses nd I get back t= he path selected. I tried to call a JFielChosser (sinwg) thorught wicket but there seems to b= e some problem, the dialog cmes in a different location first time and in t= he center of the 2nd time onwards, I guess the modality is wrong. The JFile= Chooser needs a Component object type as its parent. But I am unable to pas= s it from thewicket class. It cannot be cast to a Component or Window. Kindly help me out on this. Thanks, Shyam -- View this message in context: http://www.nabble.com/File-Chooser-dialog-needed-tp20378500p20378500.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr
File Chooser dialog needed
Hello, I am working on wicket. I need to open a filechooser dialog or a file open = dialog (like we have in JFileChooser). I am currently unable to implement it from my wicket page. All I want is a = file chooser dialog showing only directories , user chooses nd I get back t= he path selected. I tried to call a JFielChosser (sinwg) thorught wicket but there seems to b= e some problem, the dialog cmes in a different location first time and in t= he center of the 2nd time onwards, I guess the modality is wrong. The JFile= Chooser needs a Component object type as its parent. But I am unable to pas= s it from thewicket class. It cannot be cast to a Component or Window. Kindly help me out on this. Thanks, Shyam -- View this message in context: http://www.nabble.com/File-Chooser-dialog-needed-tp20378500p20378500.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File Chooser dialog needed
2008/11/7 Jeremy Thomerson [EMAIL PROTECTED] Depending on what you're doing, if you really had to do something with a directory, you may have to horror-music-starts use an applet /horror-music. Hope this helps. WicketMessage: Tag 'horror-music-starts' (line 2, column 27) has a mismatched close tag at '/horror-music' (line 3, column 1) ;-)
Re: File Chooser dialog needed
I forgot the semi-colon, too! On Fri, Nov 7, 2008 at 10:01 AM, Charlie Dobbie [EMAIL PROTECTED] wrote: 2008/11/7 Jeremy Thomerson [EMAIL PROTECTED] Depending on what you're doing, if you really had to do something with a directory, you may have to horror-music-starts use an applet /horror-music. Hope this helps. WicketMessage: Tag 'horror-music-starts' (line 2, column 27) has a mismatched close tag at '/horror-music' (line 3, column 1) ;-) -- Jeremy Thomerson http://www.wickettraining.com
Re: File Chooser dialog needed
If you really want to do that, make sure you install your web application in each user's computer... :-) Just to make sure the JFileChooser will actually work. And if you warn the user about something, don't use a javascript alert. JOptionPane is your friend here too! cheers, Bruno Borges blog.brunoborges.com.br +55 21 76727099 The glory of great men should always be measured by the means they have used to acquire it. - Francois de La Rochefoucauld On Fri, Nov 7, 2008 at 10:22 AM, Jeremy Thomerson [EMAIL PROTECTED] wrote: I forgot the semi-colon, too! On Fri, Nov 7, 2008 at 10:01 AM, Charlie Dobbie [EMAIL PROTECTED] wrote: 2008/11/7 Jeremy Thomerson [EMAIL PROTECTED] Depending on what you're doing, if you really had to do something with a directory, you may have to horror-music-starts use an applet /horror-music. Hope this helps. WicketMessage: Tag 'horror-music-starts' (line 2, column 27) has a mismatched close tag at '/horror-music' (line 3, column 1) ;-) -- Jeremy Thomerson http://www.wickettraining.com
RE: File Chooser dialog needed
Thanks for your reply. My main aim of this task is to download an item into the directory user selects. So need to open a file dialog to help user choose a directory and then from it get the path user chose, so as to proceed with my download. So as you can imagine for this, i have a browse kindoff button for user to chose a directory and as it closes, need to display the path selected in a text field. The button as well as textfield stand on a wicket page. Just the action of opening a file browser is what i want. I am very new to wicket. Could you pls explain more on what i would have to do to open such a dialog nd then get the path selected ? A code example would be appreciated. Thanks From: Jeremy Thomerson [EMAIL PROTECTED] Sent: Friday, November 07, 2008 9:01 PM To: users@wicket.apache.org; [EMAIL PROTECTED] Subject: Re: File Chooser dialog needed Swing classes are not in the same heirarchy as Wicket's and the two are not made to work together. What you need is to add an input type=file / and a FileUpload (Wicket class). However, you can't have a user just select a directory from their browser - this is a limitation of web apps. Besides, what could you possibly do with that directory path once you had it? You don't have access to their local computer Depending on what you're doing, if you really had to do something with a directory, you may have to horror-music-starts use an applet /horror-music. Hope this helps. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Nov 7, 2008 at 5:04 AM, 123shyam [EMAIL PROTECTED] wrote: Hello, I am working on wicket. I need to open a filechooser dialog or a file open = dialog (like we have in JFileChooser). I am currently unable to implement it from my wicket page. All I want is a = file chooser dialog showing only directories , user chooses nd I get back t= he path selected. I tried to call a JFielChosser (sinwg) thorught wicket but there seems to b= e some problem, the dialog cmes in a different location first time and in t= he center of the 2nd time onwards, I guess the modality is wrong. The JFile= Chooser needs a Component object type as its parent. But I am unable to pas= s it from thewicket class. It cannot be cast to a Component or Window. Kindly help me out on this. Thanks, Shyam -- View this message in context: http://www.nabble.com/File-Chooser-dialog-needed-tp20378500p20378500.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including attachment if any) is confidential and may be privileged. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. MindTree reserves the right to monitor and review the content of all messages sent to or from MindTree e-mail address. Messages sent to or from this e-mail address may be stored on the MindTree e-mail system or else where. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: File Chooser dialog needed
You simply can't do this in web apps. You don't choose where to write something to - you don't have access to write anything to the user's computer. All you can do is give the user a file to download, and the browser will automatically ask them for what folder they want to save it to. For this, search Nabble or Google for DownloadLink. Give the user a link (DownloadLink) to a file. They click it. The browser opens your dialog for you. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Nov 7, 2008 at 11:48 AM, Shyam Narayanan [EMAIL PROTECTED] wrote: Thanks for your reply. My main aim of this task is to download an item into the directory user selects. So need to open a file dialog to help user choose a directory and then from it get the path user chose, so as to proceed with my download. So as you can imagine for this, i have a browse kindoff button for user to chose a directory and as it closes, need to display the path selected in a text field. The button as well as textfield stand on a wicket page. Just the action of opening a file browser is what i want. I am very new to wicket. Could you pls explain more on what i would have to do to open such a dialog nd then get the path selected ? A code example would be appreciated. Thanks From: Jeremy Thomerson [EMAIL PROTECTED] Sent: Friday, November 07, 2008 9:01 PM To: users@wicket.apache.org; [EMAIL PROTECTED] Subject: Re: File Chooser dialog needed Swing classes are not in the same heirarchy as Wicket's and the two are not made to work together. What you need is to add an input type=file / and a FileUpload (Wicket class). However, you can't have a user just select a directory from their browser - this is a limitation of web apps. Besides, what could you possibly do with that directory path once you had it? You don't have access to their local computer Depending on what you're doing, if you really had to do something with a directory, you may have to horror-music-starts use an applet /horror-music. Hope this helps. -- Jeremy Thomerson http://www.wickettraining.com On Fri, Nov 7, 2008 at 5:04 AM, 123shyam [EMAIL PROTECTED] wrote: Hello, I am working on wicket. I need to open a filechooser dialog or a file open = dialog (like we have in JFileChooser). I am currently unable to implement it from my wicket page. All I want is a = file chooser dialog showing only directories , user chooses nd I get back t= he path selected. I tried to call a JFielChosser (sinwg) thorught wicket but there seems to b= e some problem, the dialog cmes in a different location first time and in t= he center of the 2nd time onwards, I guess the modality is wrong. The JFile= Chooser needs a Component object type as its parent. But I am unable to pas= s it from thewicket class. It cannot be cast to a Component or Window. Kindly help me out on this. Thanks, Shyam -- View this message in context: http://www.nabble.com/File-Chooser-dialog-needed-tp20378500p20378500.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message (including attachment if any) is confidential and may be privileged. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission. MindTree reserves the right to monitor and review the content of all messages sent to or from MindTree e-mail address. Messages sent to or from this e-mail address may be stored on the MindTree e-mail system or else where. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]