Migrating from GWC-HTML5 to GBC

Moving your applications from the Genero Web Client for HTML5 (GWC-HTML5) to the Genero Browser Client (GBC) involves some changes to the customization used, as discussed in this topic.

Note: Starting with Genero 3.10, the Genero Web Client for JavaScript (GWC-JS) is renamed as the Genero Browser Client (GBC).
Note: It is important to review the features and limitations pages in the Genero Browser Client User Guide prior to migrating from the GWC-HTML5 application to the GBC. This topic provides you with tips and recommendations based on migration experience.

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";
Important: 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):
  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 GBC, the path parameter is ignored, and wildcards can only hold one type of file extension. For more information on the use of this command, please see the "Standard front calls" section in the Genero Business Development Language User Guide.
    Figure: 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.
    TRY
      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