Deploying an application that includes a file upload field

When deploying an application for the Genero Web Client, where the application includes uploading a file, you need to verify that a file upload snippet exists, and the form fields which control the files to be uploaded reference the appropriate file upload style.

  1. Verify the file upload snippet exists.
  2. Verify the form definition file references the file upload style.

Verify the file upload snippet exists.

Uploading a file with the Genero Web Client requires that the snippet set include a FileUpload.xhtml snippet. By default, a file upload snippet is provided in the application server configuration file as.xcf.

<SNIPPET Id="Edit" Style="FileUpload">$(res.path.tpl.html5)/FileUpload.xhtml
</SNIPPET>

Verify the form definition file references the file upload style.

When the application displays a form, EDIT fields responsible for the upload of files should prompt the user to select the file to upload, typically by providing a browse button that allows the user to browse directories and select a file. To achieve this, add a STYLE attribute of FileUpload to those fields where the user must select a file to upload.

For example, from a form definition (per) file:
EDIT main1 = formonly.main1, STYLE="FileUpload"
When an EDIT field has the STYLE attribute of FileUpload, the FileUpload.xhtml snippet is used to render that field. All other EDIT fields continue to use the Edit.xhtml snippet for rendering.