Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

 

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

 

 

 

Additional Mentions and References

 

 

  • No labels