The ObjectsViewDef element define all views for the object types in the objects tree. These views are displayed in the Object View area for the selected object. Which views should appear when selecting a node in the tree is based on the object type for the tree node and the corresponding object view definition.
When an object is opened in the database tree (sa in the screenshot below) a corresponding object view tab is created (right in the sample). Each of the DataView elements in the ObjectView will appear as sub tabs in the object view tab. The selected object and its information is passed to each of the data views for processing and presentation. The following example show the Object View in DbVisualizer and its ObjectView element definition.
|Representation in DbVisualizer||XML definition|
| Code Block|
<DataView type="Logins" label="Logins"
<DataView type="Info" label="Info"
<DataView type="Databases" label="Databases"
<DataView type="Roles" label="Roles"
The screenshot and the database tree show both the Logins node and its child nodes, jstask, probe and sa. These nodes are instances of the object types Logins (labeled Logins in the screenshot) and Login (the three sub nodes: jstask, sa and probe).
The type attribute value is used when a node is clicked in the database objects tree to map with the corresponding ObjectView definition. The following lists the attributes for ObjectView:
|The type of the ObjectView as declared in the GroupNode and DataNode elements in the ObjectsTreeDef section|
|action||drop||drop is useful when extending another database profile to remove the ObjectView and all its child views|
XML element - DataView
The DataView element is comparable with the DataNode element in the ObjectsTreeDef. It defines what SQL (command) should be executed, labeling, viewer type (presentation form) and other characteristics. The following is the DataView definitions for the Login object type. (The ObjectView element is part of the sample just for clarification).
All three DataView elements have a viewer attribute identifying how the data in the view should be be presented, e.g., as a grid or a form. See the next sections for a list of viewers. The following lists all attributes for DataView:
Every DataView element must have a unique id which is not only unique in the current profile but also with all id's in extended profiles
To make sure the id is unique use the following recommended format:
(The id should not contain any empty space or special characters other than dash ("-")).
|The label for the viewer as it will appear in the tab|
|icon|| || grid text|
date, table- message, navigator, ddl, ProcedureViewer
ddl, form, grid, message, navigator, node-form, ProcedureViewer, table-data, table-refs, tables-refs, table-
text. See the viewers section in this document for more information
|Drop the viewer if its label is not equal to the value of this attribute|
|Used to specify a custom Java class used as the viewer|
|Used to pass arguments to a custom viewer|
|action||drop||drop is useful when extending another database profile to remove the DataView|
|Relative HTML link to the related chapter in the users guide|
|Specifies the order of this DataView among a collection of viewers having the same parent ObjectView. It can either be an index starting at 0 (first) or a node type. Ex. order-before="sybasease-login-databases" will order this DataView before viewers defined by the id="sybasease-login-databases" attribute|
|Specifies the order of this DataView among a collection of viewers having the same parent ObjectView. It can either be an index starting at 0 (first) or a node type. Ex. order-after="sybasease-login-databases" will order this DataView after viewers defined by the id="sybasease-login-databases" attribute|
The viewer attribute for a DataView define how the data for the viewer should be presented. The following sections walk through the supported viewers.
The following sample illustrates the viewer attribute.
| Code Block|
<Input name="disableEditeditDisabled" value="true"/>
Viewer - table-rowcount