Description
In BBj 25.03 and higher, this method sets assorted options on this BBjFileOpen dialog, corresponding to the MODE= option of the FILEOPEN() Function.
Syntax
Return Value |
Method |
BBjFileOpen |
modes(String modes)
|
Parameters
Variable |
Description |
modes |
One or more comma-separated options that modify the behavior of this BBjFileOpen dialog.
CLIENT |
If this option is present, the FILEOPEN dialog will show files on the client's filesystem instead of the server's system. If this option is omitted, the FILEOPEN 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. This is the default.
2 The user is presented with a dialogue requesting confirmation.
|
RESOLVE=int |
This mode specifies how the selected filename should be resolved. The available options are:
0 The absolute filename is returned.
1 The canonical filename is returned. In some environments, this resolves selected symbolic links to their target file. 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 FILEOPEN style name, equivalent to BBjControl::addStyle. This can be used to apply custom CSS styling to a BUI FILEOPEN.
|
attr=value |
The mode string can specify selected DWC dialog attributes (e.g. "theme=primary,blurred=true").
A server fileopen() can specify DWC file-chooser attributes.
A client fileopen() can specify DWC upload attributes.
|
|
Return Value
Returns this BBjFileOpen object, enabling methods to be chained.
Example
fileopen! = bbjapi().fileopen().title("Open a client text file")
print fileopen!.modes("client").ext("txt").show()
|
BBjAPI
FILEOPEN() Function - Create File Open Dialog
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.