Overview
Moving your Genero Web Client for HTML5 (GWC-HTML5) applications to Genero Browser Client (GBC) involves some changes to the customization used. This page provides you with tips and recommendations based on migration experience that is intended to help your migration efforts.
NOTE: It is important to review the features and limitations prior to migrating from the GWC-HTML5 application to the GBC.
Navigating Open Applications
With GWC for HTML5, each application started with RUN
or RUN WITHOUT WAITING
opens a new tab in your browser. GBC provides a sidebar panel. Each application started with RUN
or RUN WITHOUT WAITING
replaces the application in the current window. You can access the other applications and make them current by selecting them from the sidebar panel.
File Upload to Server
To upload a file with GWC-HTML5 Web client, you used an EDIT
field with the style FileUpload
to create a file chooser dialog.
EDIT sfile1=formonly.sfile1, style="FileUpload";
The FileUpload
style is not supported by GBC.
To migrate from GWC-HTML5 to GBC, you need to remove FileUpload
style and add a call to openFile
front call, followed by call to fgl_getfile
. This is the same file upload method as you use in Genero Desktop Client (GDC):
-
Use the openFile front call to open the file chooser dialog so that the user can select a file to upload.
DEFINE infile STRING CALL ui.Interface.frontCall("standard", "openFile", ["c:\\fjs\\doc","doc.pdf","*.pdf","Choose a file to upload"], infile)
NOTE: For more information on the use of this command, see the "Standard front calls" section in the Genero Business Development Language User Guide.
-
Use the
fgl_getfile
to upload the file the user has chosen. The call to thefgl_getfile
function requires no interaction from the user so it can be called immediately to upload the file to a directory specified in the application server.CALL fgl_getfile(infile, "/opt/myapp/received_files") CALL fgl_winmessage("File uploaded", infile, "info") # Display a window with message after uploading CATCH ERROR sqlca.sqlcode, " ", sqlca.sqlerrm # Catch runtime execution errors from the SQLCA diagnostic record END TRY