Description
In BBj 25.03 and higher, this method sets assorted options on this BBjFileSave dialog, corresponding to the MODE= option of the FILESAVE() Function .
Syntax
Return Value |
Method |
BBjFileSave |
modes(String modes) |
Parameters
Variable |
Description |
modes |
One or more comma-separated options that modify the behavior of this BBjFileSave dialog.
CLIENT |
If this option is present, the FILESAVE dialog will show files on the client's filesystem instead of the server's system. If this option is omitted, the FILESAVE dialog will show files on the server's filesystem. |
EXISTS=int |
This mode specifies what should happen when the user selects a file that already exists. The available options are:
0 The selection is accepted with no additional user action.
1 The user is presented with an error dialogue; the selection is not allowed.
2 The user is presented with a dialogue requesting confirmation. This is the default.
|
RESTRICTED |
This mode restricts a server-side file chooser to the directory specified in the default directory (path). |
STYLE=name |
This sets a FILESAVE style name, equivalent to BBjControl::addStyle. This can be used to apply custom CSS styling to a BUI FILESAVE.
|
attr=value |
The mode string can specify selected DWC dialog attributes (e.g. "theme=primary,blurred=true").
A server filesave() can specify DWC file-chooser attributes.
A client filesave() can specify DWC file-save attributes.
|
|
Return Value
Returns this BBjFileSave object, enabling methods to be chained.
Example
filesave! = bbjapi().filesave().title("Save a client text file")
print filesave!.modes("client").ext("txt").name("sample.txt").show()
|
See Also
BBjAPI
FILESAVE() Function - Create File Save Dialog
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.