This content has been marked as final. Show 5 replies
Just for clarification, you said " +I'm using a newest version of Forms+". This may be the newest major version, however the latest patched version is 126.96.36.199, which would include updates for WebUtil if any existed.
As for your issue, because you didn't provide details regarding exactly what you are doing or how you are doing it, I will guess. There is a known issue (bug 10015816) which causes the opening directory to be one lower than what you set as the default. There is a work-around, but it appears to only work with FILE_OPEN_DIALOG. This does the same thing as CLIENT_GET_FILE_NAME so changing should be too much of an issue. The trick to making it work is to add a trailing slash to the end of the directory. For example:
WEBUTIL_FILE.FILE_OPEN_DIALOG ('C:\tmp\hello\ ' ...
Thank you for trying to help.
Allow me to correct the "newest". I wanted to write that I'm using a "newer" form builder version.
Therefore simply thinking I assumed that patches regarding the 10th version of forms are included in the 11th version.
Indeed I didn't provide much detail or code example but it seems you didn't read well, I said it always opens user's My Documents regardless what I set as a directory_name. So, it doesn't seem to be the bug you are mentioning.
Here is how I use this function:
l_filename := client_get_file_name(directory_name => 'C:\',
file_name => null,
file_filter => 'All Files (*.*) |*.*|pdf Files (*.pdf)|*.pdf|JPEG Files (*.jpg)|*.jpg|',
message => 'Choose a file',
dialog_type => null,
select_file => null);
I have done a little more investigating and think I am closer to identifying the root cause of the problem. In the mean time, it appears that you can correct the issue in your plsql simply by adding a blank space after the path, but within the quotes. For example change your code as follows:1 person found this helpful
Notice the space added after C:\
l_filename := client_get_file_name(directory_name => 'C:\ ',
If your path included a sub-directory you would need to ensure that it included a trailing \ and the blank space. For example:
l_filename := client_get_file_name(directory_name => 'C:\temp\ ',
Edited by: Michael Ferrante (Oracle) on May 9, 2013 10:29 AM
Indeed the blank space after the path did the trick. It solved the issue partially though.
The question now is, how do we deal with the case passing NULL to the directory_name parameter? I'm not sure but I think I've read somewhere in the documentation that leaving this parameter NULL gives it the functionality to always hold the last directory opened. So the trick with the blank space doesn't seem to work in this case.
The exact behavior for passing in NULL likely will vary depending on the client OS and the JRE version being used. That said, my opinion is that I would not code the app in such a way to allow the user to not pass a value. If NULL is entered you should either throw a custom error indicating that some path must be enter or hard code your own default location. The user home directory is always a good place to land when nothing is passed in. Expecting to retain the value of the last opened directory is not practical in Forms unless you code that yourself.1 person found this helpful