|
 |
The View Object holds data about the current view file. The View Object has the following properties:
Instance Properties
view.design |
This property holds a boolean value indicating whether the view is in design mode. |
view.file |
This property holds a File object containing information about the .view file. |
view.file.path |
This property holds a string denoting the file path of the current view file, e.g., "/Addressbook". |
view.file.id |
This property holds a string that will be prepended to URL arguments for data regions in the view file. |
view.file.type |
This property holds a string denoting the type of view file: either "" (for a stand alone view file), "template", or "include". |
view.file.parent |
For view files of type "template" or "include", this property holds a File object containing infomation about the parent view. |
view.region |
This property holds an object containing information about the current data region. |
view.region.id |
A string that will be prepended to URL arguments for the current data region. |
view.region.mode |
A string denoting the current mode of the data region: either "grid", "details", "update", or "insert". |
view.region.file |
A File object containing information about the view that contains the current data region. |
view.region.parent |
For nested data regions, this property holds an object containing information about the parent data region. |
view.region.resultset |
A Resultset object which contains the same records as the current data region. |
view.region.page |
A integer denoting the currently displayed page of the data region. |
view.region.pagesize |
An integer denoting the number of records displayed per page of the data region. |
|
Example
Assume that the following script appears within the dataregion of the view file "/Addressbook/default.view". Also assume that the view file is being displayed in grid mode.
<!--#
response.write("view.design: " + view.design + "<br>");
response.write("view.file: " + view.file + "<br>");
response.write("view.file.path: " + view.file.path + "<br>");
response.write("view.file.id: " + view.file.id + "<br>");
response.write("view.file.type: " + view.file.type + "<br>");
response.write("view.file.parent: " + view.file.parent + "<br>");
response.write("view.region: " + view.region + "<br>");
response.write("view.region.id: " + view.region.id + "<br>");
response.write("view.region.mode: " + view.region.mode + "<br>");
response.write("view.region.file: " + view.region.file + "<br>");
response.write("view.region.file.path: " + view.region.file.path + "<br>");
response.write("view.region.parent: " + view.region.parent + "<br>");
response.write("view.region.resultset: " + view.region.resultset + "<br>");
response.write("view.region.page: " + view.region.page + "<br>");
response.write("view.region.pagesize: " + view.region.pagesize + "<br>");
#-->
Output:
view.design: false
view.file: [Object Object]
view.file.path: /AddressBook/default.view
view.file.id:
view.file.type:
view.file.parent: undefined
view.region: [Object Object]
view.region.id:
view.region.mode: grid
view.region.file: [Object Object]
view.region.file.path: /AddressBook/default.view
view.region.parent:
view.region.resultset: [Object Resultset]
view.region.page: 1
view.region.pagesize: 20
|