<filebrowser/>

 

Description

The file browser output widget allows for blob data to be listed and downloaded. It is presented in a widget resembling a data table with the exception that the columns and row actions are not customizable.

The two columns that are provided show the file name and file size of the blob data. The row action that is provided is labelled "Open" and allows a file download of the data.

Data for the widget is specified by specifying an object collection where the object has a blob attribute. In addition the attribute name that represents the blob data is specified.

As with the data table widget, the title and refreshIntervalSeconds attributes are supported but not required.

 

 

Example

The example below demonstrates the use of the file browser widget. Note that in this example the source collection will only contain one object instance namely the currently logged in user.

View XML
<filebrowser dataAttribute="governmentAssistanceCertificate">
    <visible function="showFileBrowser"/>
    <collectionSource function="getCurrentFarmerAsCollection"/>
</filebrowser>
Backing unit
Farmer farmer;
.
.
void init() {
    farmer = Farmer:user();
}
.
.
Farmer[] getCurrentFarmerAsCollection() {
    Farmer[] farmers;
    farmers.append(farmer);
    return farmers;
}

<filebrowser> example screenshot

 

 

 

Automatic Refresh

The file browser widget allows a time interval between 30 and 1800 seconds to be specified at which point the contents of the file browser is refreshed without the need for any user intervention. This is specified using the refreshIntervalSeconds attribute.

<filebrowser dataAttribute="signupForm" refreshIntervalSeconds="30">
.
.
.
</filebrowser>

 

 

 

Additional Mentions and References