Attach
to XML Data
From the Object Properties
window you can access the Attach to XML Data dialog, which is used to connect
an object property to an element in your XML data. Once a property has
been attached to an XML element, it receives continuous updates.
When an object property is
attached to data, the Property Name and Value in the Object Properties
window will be displayed in green. This indicates that editing this value
from the Object Properties window is no longer possible. To remove the
data attachment, and resume editing capability in the Object Properties
window, right-click on the Property Name and select Detach from Data.
You will recognize that an object property has been detached from the data
source when the Property Name and Value are no longer green.
To bring up the Attach to
XML Data dialog, right-click on the Property Name from the Object Properties
window and select Attach to Data>XML. The Attach to XML Data dialog
provides three drop down menus that allow you to specify information regarding
an XML element. See Creating XML Sources for technical
details on creating and formatting an XML source.
XML
Source |
Name
of XML source containing XML element. |
Data Key |
Key corresponding to XML
element. |
Column(s) |
If
XML element is tabular, you can select which column(s) to display. |
Filter |
Check box to indicate whether
or not to filter the XML element. Filters can only be used for tabular
data. |
Filter Column |
Name of the column to use
as a filter. Multiple column names should be entered as a semicolon (;) delimited list (i.e.
col1;col2;col 3). If your column name contains a space or a semicolon, then the
entire name must be enclosed in single quotes. |
Filter Value |
Value that the Filter Column must equal.
Multiple filter values should be entered as a nested list, where values for a
given column are separated by commas within a semicolon (;) delimited list (i.e.
val1,val2;val3,val4;val5,val6). If your filter value contains a space or a
semicolon, then the entire value must be enclosed in single quotes. When * is entered
as a filter field value, data for all values in the specified filter column
will be used to update the object property. When "*" is entered, only the
literal comparative value will be used. These
are only allowed for objects which display tabular data. |
Data Server |
Select to read data through your configured Data
Server and not directly from the XML data source.
Default - Select the default Data
Server you configured in Application
Options>Data Server.
None - Bypass data being redirected
through the specified Data Server(s) for this attachment and instead attach
directly to the data source.
Named Data Servers - Select a
Named Data Server
that you configured in Application Options>Data Server.
Multi-Server Attachment - To configure
multiple data servers, enter a semicolon (;) delimited list containing two or
more
Named Data Servers (e.g. ds101;ds102). Each name specified must
correspond with a
Named Data Server
that you configured in Application Options>Data Server. It is also possible to
specify __default and __none (e.g. __default;ds101;ds102).
NOTE: The values __default and __none begin with two
underscore characters.
Alternatively, a value of * can be
entered to specify all data servers, including __default and __none.
When multiple data servers are specified, the
data attachment will be directed to each data server in the list. For tabular
data attachments, a column named DataServerName will be added as the
first column of the table and contain the name of the server from which the
data was received.
A multi-server attachment will receive data
independently from each of the servers it specifies, so in most cases it will
be necessary to combine the tables received into a single table. This can be
accomplished in two ways:
1) The multi-server attachment can be
applied to a local cache that has the DataServerName column specified
as an index column. The current table of that cache will contain the
combination of the tables received from all servers. NOTE: It may also be
necessary to configure cache row expiration settings to remove defunct rows.
2) The multi-server attachment can be applied as the Table argument of the
RTView function named
Combine
Multi-Server Tables.
|
The XML Source drop down menu lists
all available XML sources. Drop down menus for Data Key, Column(s) and
Filter Column populate based on the selected XML source. The XML Source
field automatically displays the name of the default XML source. The Column(s)
and Filter Column drop down menus will only contain options if the selected
Data Key is a tabular element that has been included in an XML update.
If the item you require is not listed, type your selection into the field.
For information on adding XML sources or selecting a default XML source,
see
Application Options.
Validation Colors
Fields in the dialog change colors
according to the information entered. These colors indicate whether or
not information is valid. Information entered into the dialog is validated
against elements included in an XML update.
The following describes the significance
of the Attach to XML Data validation colors:
|
Blue |
Unknown |
Entry does
not match any known XML source*. |
|
White |
Valid state |
Entry is valid. |
|
Red |
Invalid state |
XML source
is valid, but Data Key, Column(s) or Filter Column selected are not. |
|
Gray |
Not Required |
Field does
not require a value. This applies to the Column(s), Filter Column or Filter
Value field for data keys that are not tabular elements. |
*If an XML source is validated as Unknown,
RTView will attempt to read it when you click OK or Apply.
Substitutions
Substitutions allow you
to build open-ended displays in which data attachments depend on values
defined at the time the display is run. Generic
names, such as $data1 and $data2, are used instead of values for specific
data keys. Later when the display is running, these generic values are
defined by the actual names of specific keys, such as element1_data
and element2_data. In
this way, a single display can be reused to show data from a number of
different sources. For more information on creating displays using substitution
values, see Substitutions.
RTViewDs
The RTViewDs source provides information about
the listeners currently active in the XML data source. The RTViewDs.Server
source provides information about all listeners that a data server is currently
maintaining for all of its clients. That is, while the RTViewDs.Server source
provides information from a data server about all listeners from all
of its clients, the RTViewDs source only provides information about listeners
that the current client (e.g. Display Builder, Display Viewer) has redirected to
data servers.
In the Attach to XML Data dialog, manually enter
RTViewDs
or RTViewDs.Server in the
XML Source field. These options
are not available from the drop down list.
|
 |
XML Source |
Data Key |
Description |
Column Name |
Description |
RTViewDs |
listeners |
Returns a table that contains a row for each unique data attachment to another
XML source, and a row for each unique data attachment that has been redirected
to a Data Server. |
Source |
The name of
the XML source (file), or the name of the Data Server. |
Local |
When checked, indicates
that the source is an XML source. When unchecked, indicates that the source is a
Data Server. |
Adapter |
The name of the data
adapter, which is xml for local XML attachments and cache, sql,
and so forth, for redirected listeners. |
Key |
The entire data
attachment string. |
Listeners |
The total number of
listeners for the attachment string. |
Updated
|
Specifies the time that
the data was most recently applied to the listener. |
cacheListeners |
Returns a table that contains a row for each unique cache data attachment that
has been redirected to a Data Server.
NOTE: The cacheListeners table does NOT show
local cache listeners but rather, only cache listeners that have been redirected
to a Data Server. The Local and Adapter columns are not specified
in this table because only remote listeners for the cache data adapter are
shown. |
Source |
The name of the
Data Server to which the cache attachment has been redirected. |
Key |
The entire data
attachment string. |
Listeners |
The total number of
listeners for the attachment string. |
Updated
|
Specifies the time that
the data was most recently applied to the listener. |
Cache Name |
The name of the cache in the cache data attachment. |
Table Name |
The name of the table in the cache
data attachment. |
Columns |
The name of the table column in the
cache data attachment. |
Filter Columns |
The names of columns that have a
filter applied to them. |
Filter Values |
The value of the filters applied to the columns
(listed in Filter Columns). |
RTViewDs.Server |
listeners |
Returns a
table that contains one row for each unique data attachment for each client of
the data server. |
Client ID |
Numeric ID of the
client. |
Address |
IP address of the
client. |
Host |
Hostname of the
client, if available, or http if the client is connected via the rtvdata
servlet. |
Adapter |
The name of the data
adapter, which is xml for local XML attachments and cache, sql,
and so forth, for redirected listeners. |
Key |
The entire data
attachment string. |
Listeners |
Total number of
listeners for the attachment string. |
Pushed |
Time data was most
recently pushed from the server to the client. |
Seq |
Sequence number
assigned to most recent data push. |
cacheListeners |
Returns a
table that contains one row for each unique cache data attachment for each
client of the data server. |
Client ID |
Numeric ID of the
client. |
Address |
IP address of the
client. |
Host |
Hostname of the
client, if available, or http if the client is connected via the rtvdata
servlet. |
Key |
The entire data
attachment string. |
Listeners |
Total number of
listeners for the attachment string. |
Pushed |
Time data was most
recently pushed from the server to the client. |
Seq |
Sequence number
assigned to most recent data push. |
Cache Name |
The name of the cache in the cache data attachment. |
Table Name |
The name of the table in the cache
data attachment. |
Columns |
The name of the table column in the
cache data attachment. |
Filter Columns |
The names of columns that have a
filter applied to them. |
Filter Values |
The value of the filters applied to the columns
(listed in Filter Columns). |
Select Table Columns
From the Attach to XML Data dialog
you can specify which table columns to display and in what order they will
appear. In order to populate the listing of available columns, you must
first select a valid XML source and data key.
To bring up the Select Columns dialog,
click on the ellipse button in
the Column(s) field (or right-click in the Column(s) field and choose Select
Columns). The dialog should contain a list of Available Columns that
you can add to your table.
To add a column, select an item from
the Available Columns list and click on the Add button. If the item you
require is not listed, type your selection into the Enter Column Name field.
Click the Remove button to delete an item previously added to the Selected
Columns list. You can control the order of columns in a table by arranging
the items in the Selected Columns list with the Move Up and Move Down buttons.
Validation colors
indicate whether selected columns are valid. However, if even one column
selected is invalid, the Column(s) field in the Attach to XML Data dialog
will register as an invalid entry. NOTE: Invalid columns will not update.
If no data is available for a table
row within a selected column, the table cell will display one the following
values: N/A, false, 0, or 0.0.
The following describes the
Attach to XML Data dialog commands:
Command |
Description |
OK |
Applies
values and closes the dialog. |
Apply |
Applies
values without closing the dialog. |
Reset |
Resets
all fields to last values applied. |
Clear |
Clears
all fields. Detaches object from data source (once Apply or OK is selected). |
Cancel |
Closes
the dialog with last values applied. |
|