Document¶
The Document control is a widget that displays an SAP Document Service folder as an embedded element. It is only available in web runtime.
When assigning a rule to a property of Document, the rule will be passed an instance of the following proxy class as an argument:
Document Properties¶
| Property | Type | Required | Default |
|---|---|---|---|
| Caption | string |
No | |
| IsEditable | boolean |
No | true |
| IsVisible | boolean |
No | true |
| Separator | boolean |
No | true |
| Value | string |
No | |
| _Name | string |
Yes | |
| _Type | const |
Yes |
Caption¶
The key name of the property.
- type:
string
IsEditable¶
Disable or enable document uploading/deleting.
- type:
boolean - default:
true
IsVisible¶
Set the visibility of the control.
- type:
boolean - default:
true
Separator¶
Set the visibility of the separator line below the control. This property takes precedence over ControlSeparator in
section and is only supported for FormCell control in SectionedTable and not supported in FormCell Container.
- type:
boolean - default:
true
Value¶
A repositoryId, rootFolderId or objectId which links to a unique folder of document service. If leave empty, a new folder will be created in document service instance.
- type:
string
_Name¶
- type:
string
_Type¶
- type:
const
The value of this property must be:
"Control.Type.FormCell.Document"
Examples¶
For creating¶
If Value is empty, a new container folder will be created and the folderId will be assigned back to Value automatically.
{
"_Type": "Page",
"_Name": "FormCellsPage",
"Caption": "FormCell Example",
"Controls": [{
"_Type": "Control.Type.FormCellContainer",
"_Name": "FormCellContainer",
"Sections": [{
"Caption": "Create",
"Controls": [{
"_Type": "Control.Type.FormCell.Document",
"_Name": "Documentcell",
"Caption": "Documents",
"IsEditable": true
}]
}]
}]
}
For updating¶
{
"_Type": "Page",
"_Name": "FormCellsPage",
"Caption": "FormCell Example",
"Controls": [{
"_Type": "Control.Type.FormCellContainer",
"_Name": "FormCellContainer",
"Sections": [{
"Caption": "Update",
"Controls": [{
"_Type": "Control.Type.FormCell.Document",
"_Name": "Documentcell",
"Caption": "Attachments",
"Value": "{folder_id}",
"IsEditable": true
}]
}]
}]
}
For displaying¶
Set IsEditable to false.
{
"_Type": "Page",
"_Name": "FormCellsPage",
"Caption": "FormCell Example",
"Controls": [{
"_Type": "Control.Type.FormCellContainer",
"_Name": "FormCellContainer",
"Sections": [{
"Caption": "Display",
"Controls": [{
"_Type": "Control.Type.FormCell.Document",
"_Name": "Documentcell",
"Caption": "Attachments",
"Value": "{folder_id}",
"IsEditable": false
}]
}]
}]
}