Class Reference
IRIS for UNIX 2024.1.2
|
|
Private
Storage
|
This dialog page displays a file selection window
listing directories and files on the server.
This is intended for use within server portal pages.
To use this dialog, the current user must hold USE privileges on
one of the following resources:
%Admin_Manage,%Admin_Operate,%Admin_Secure,%Development
For an production-enabled namespace, resource %Ens_ViewFileSystem is required.
zenLaunchPopupWindow('%ZEN.Dialog.fileSelect.cls?Dir='+encodeURIComponent(Dir)+'&wildcard='+wildcard,'FileSelect','resizable,width=600,height=700');
If Dir is null, then the manager directory is used when the dialog is opened. If Dir contains a partial directory, then the last valid level of directory, if can be found, is used. If Dir contains a filename or a partical name without a directory then the manager directory is used for the filename. When OK is pressed, whatever is shown in the File name field is returned to the calling page.
If you are opening the dialog as a popup window such as shown in the above example, then you should have an onPopupAction method defined on the calling page. In the following example, a Zen control "FileName" is defined on your calling page, and upon returning from the fileSelect dialog by clicking "OK", the returned value will be set into your Zen control "FileName":
ClientMethod onPopupAction(popupName, action, value) [ Language = javascript ] { if (action == "ok") { if (popupName == "FileSelect") zen("FileName").setValue(value); } }
ISC Developers: Please use caution when modifying logic in this class. Your change needs to be tested in Windows, Unix, and VMS for all cases.
|
|
|
|
Composed Default Directory path. After much checking, this is the final default directory that is used as default.
Original Directory path and/or filename passed in. If null is passed in, then manager directory will be used.
Original File name passed in (optional)
Whether to show directory only or with files
|
This callback is called after the server-side page object and all of its children are created.
Subclasses can override this to add, remove, or modify items within the page object model, or to provide values for controls.
Get the (localized) subtitle string for the dialog. This should be implemented in a subclass.
Get the (localized) title string for the dialog. This should be implemented in a subclass.
This method builds the list of drives for the "look in" window. It will contain the available drives (mount points), or the user-configured set of available directories. In addition, it will contain the set of parent directories for the specified directory.
Check if file has extension. If not, add it.
****** The Following Methods are Called from UtilFile*.csp Also ******
If user enters a directory but without drive, we add the drive here. This overrides the "Look in" directory. For Windows and VMS only.
Check if user entered filename ends with ":". If yes, then we should add "/" or [000000] to make valid drive.
For Windows: If user enters : without \ then we add it here.
For VMS: If user enters : without any [directory] then add [000000] here.
If we don't do this then directory would be invalid.
Construct new new file name, if it does not have dir yet
Check if user entered directory exists. Return a valid directory.
Construct new directory given the Look in directory and selected directory from the middle frame
Build file and directory list
Construct new directory given the Look in directory and selected directory from the middle frame
User selected a different directory from "Lookin" drop-down. If FileName is available, add to the newly selected directory.
This method refreshes the contents with the current file type and directory/file name
changeView
Get the value that will be applied when the user presses the OK button. This is implemented by subclasses.
User clicked an item. We put it in the File name field. User can OK it or [Enter] to drill down.
User has selected a new item (double click).
This callback, if defined, is called when the user presses the OK or Apply action buttons. If this returns false, then the action is cancelled.
Check FileName value. If user entered a path, then return as is.
If user enters something but not including a path, then add selected path in front of it.
It is possible that user is entering a sub directory or file, therefore as a curtersey we add the path for them.
In addition, if user enters a filename without a file extension, then we add the filetype choice from the drop-down.
This callback, if defined, is called when the dialog page is loaded.
Examine if user hit the Return key. If yes, start the search. This method handles all keydown events on the window.
This client event, if present, is fired when the page is resized.
up one level