Community
Participate
Working Groups
Build Identifier: v14_Maintenance FileDialog.getFileNames() returns the absolute paths of the uploaded files. I'm using this from within a wizard, and want to display the files in the next wizard step (after the FileDialog was closed). But the user is not interested in the absolute paths on the server, the fileNames would be sufficient. So my suggestion would be to provide two methods: getFilePaths() getFileNames() Reproducible: Always
Created attachment 202587 [details] proposed patch
I just realized that this is a single sourced component, and the attached patch of course doesn' t fit very well into the original FileDialog API.. Any other ideas how to fix the issue without breaking the API?
(In reply to comment #2) > I just realized that this is a single sourced component, and the attached patch > of course doesn' t fit very well into the original FileDialog API.. > > Any other ideas how to fix the issue without breaking the API? Hi Werner, You are correct. Adding API to the file dialog should be avoided if possible. There is one method already that is not part of the FileDialog API, namely setAutoUpload(boolean), but we are trying to remove that as well. What I suggest is to extract the filenames from the returned paths using File.separator and string manipulation methods.
(In reply to comment #1) > Created attachment 202587 [details] > proposed patch Thank you very much for attempting to provide a patch.
(In reply to comment #3) > What I suggest is to extract the filenames from the returned paths using > File.separator and string manipulation methods. Thanks Austin, I already thaught about doing that on my own. I just wanted to avoid string manipulation if possible, and thought this would probably be a common use case in RAP context. Of course I understand your decision not to add API because of single sourcing.