Migrating GWC-HTML5 to GBC

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-HTML5, each application that starts with RUN or RUN WITHOUT WAITING opens a new tab in your browser. GBC provides a sidebar panel. Each application that starts 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 the GWC-HTML5 Web client, you use 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 the FileUpload style and add a call to the openFile front call, followed by call to fgl_getfile. This is the same file upload method as you use in Genero Desktop Client (GDC):

  1. 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.

    GBC File Upload Pop-up Window image shows example of file chooser pop-up window that is displayed by the front call openFile function in an application opened by the GBC front-end.

  2. Use the fgl_getfile to upload the file the user has chosen. The call to the fgl_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