Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Table of Contents

...

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 DbVisualizerXML definition
Image Modified
Code Block
languagehtml/xml
<ObjectView type="Logins">
  <DataView type="Logins" label="Logins" 
            viewer="grid">
    <Command idref="sybase-ase.getLogins"/>
  </DataView>
</ObjectView>

<ObjectView type="Login"> 
  <DataView type="Info" label="Info" 
            viewer="node-form"/>
  <DataView type="Databases" label="Databases" 
            viewer="grid">
    <Command idref="sybase-ase.getLoginDatabases"/>
  </DataView>
  <DataView type="Roles" label="Roles" 
            viewer="grid">
    <Command idref="sybase-ase.getLoginRoles"/>
  </DataView>
</ObjectView>

The screenshot and the database tree show both the Logins node and its child nodes, jstaskprobe 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:

AttributeValueDescription
type
 

The type of the ObjectView as declared in the GroupNode and DataNode elements in the ObjectsTreeDef section
actiondropdrop 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:

AttributeValueDescription
id
 

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

Info

To make sure the id is unique use the following recommended format:

profileName-objectViewType-viewerLabel.

Ex: sybasease-login-databases

(The id should not contain any empty space or special characters other than dash ("-")).

label
 

The label for the viewer as it will appear in the tab
icon
 

The icon as defined in the icons.prefs file(s)
viewer
 

One of: grid, text, form, node-form, table-refs, tables-refs, table-date, table-rowcount, message, navigator, ddl, ProcedureViewer. See the viewers section in this document for more information
drop-label-not-equal
 

Drop the viewer if its label is not equal to the value of this attribute
class
 

Used to specify a custom Java class used as the viewer
classargs
 

Used to pass arguments to a custom viewer
actiondropdrop is useful when extending another database profile to remove the DataView
doclink
 

Relative HTML link to the related chapter in the users guide
order-before
 

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
order-after
 

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

Viewers

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
languagehtml/xml
<Input name="disableEditeditDisabled" value="true"/>
Viewer - table-rowcount

...