Project

General

Profile

Feature #5510

delegated click mode for SYSTEM-DIALOG GET-FILE

Added by Greg Shah almost 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
version:

Related issues

Related to User Interface - Bug #1830: implement SYSTEM-DIALOG-GET-FILE support Closed
Related to User Interface - Feature #4113: enable upload of files from the browser (in the web clients) using SYSTEM-DIALOG GET-FILE Closed
Related to User Interface - Bug #6483: SYSTEM-DIALOG GET-FILE AT-WEB-BROWSER UPLOAD doesn't open file selection dialog in Chrome Closed

History

#2 Updated by Greg Shah almost 3 years ago

  • Related to Bug #1830: implement SYSTEM-DIALOG-GET-FILE support added

#3 Updated by Greg Shah almost 3 years ago

  • Related to Feature #4113: enable upload of files from the browser (in the web clients) using SYSTEM-DIALOG GET-FILE added

#4 Updated by Greg Shah almost 3 years ago

A customer with a GUI application is moving to the web client. The original implementation of SYSTEM-DIALOG GET-FILE was implemented in #1830 and this just showed the contents of the FWD client system. This could be done with compatibility to the original 4GL implementation.

But customers needed to be able to upload or select files from the local filesystem at the browser. We added that as an enhancement in #4113 which is not compatible with the 4GL. It provides a new feature. But as noted in #4113, the browser is restricted in this area. As noted in #4113-2, the browser requires that any local file system access is only allowed from within the event handler of a real mouse click or keystroke from the user. There is no way to simulate this from Javascript, since the browser wants to ensure that malicious Javascript code cannot read the local file system. This means that we have an extra prompt to confirm that the user indeed wants to access the local file system. When the user responds to this with a click or key, then we load the dialog from inside that event handler.

The customer is concerned about this extra security dialog. They've asked if we can come up with a way to eliminate it.

Here is my idea:

  • We provide a new syntax option for SYSTEM-DIALOG GET-FILE to "register" the dialog with a given 4GL widget, most likely a button.
  • On the web client, we establish an overlay in the browser's DOM that sits above that widget. That overlay will have event handlers registered for mouse click or space/enter key. When those handlers fire, they will directly invoke the file dialog with the correct settings that normally would have been invoked on a call down from the converted 4GL code.
  • Once a list of selections/uploads has been accepted by the user, we will need to handle the upload or the sending of the list back to the 4GL. I'm not clear on the best way to do that.
  • There may need to be a way to "unregister" this as well so that the delegation can be removed. Or perhaps we remove it whenever the widget is deleted.
  • The customer refactors their 4GL code where it uses SYSTEM-DIALOG GET-FILE so that it fits into this new usage pattern.

The idea is that we can avoid the extra dialog if we delegate the opening of the file dialog completely to the web client.

#5 Updated by Hynek Cihlar almost 2 years ago

  • Related to Bug #6483: SYSTEM-DIALOG GET-FILE AT-WEB-BROWSER UPLOAD doesn't open file selection dialog in Chrome added

Also available in: Atom PDF