Rogue Wave Server Studio > Rogue Wave Server Studio Advanced Features > Creating Several Table Representations in the Same View
 
Creating Several Table Representations in the Same View
It is sometimes useful to have more than one table representations within the same view so as to represent more than one server relation.
In the Network example, let us suppose that we need to represent all domains of a network, all nodes of these domains and all input and output lines for a selected node. The resulting view contains table representations for:
*all Domain objects in the Network,
*all Node objects in those domains,
*the input lines of the selected node,
*the output lines of the selected node.
Note: This view is quite similar to the NetworkTree view in the network3 demonstration (although input and output lines are represented in the same table in that demonstration).
Here is an extract of the view specification:
view NetworkView (any panel=0,
any sds=0):
represent IlsSwRepresentation repres:
any panel=view.panel;
any sds=view.sds;
string resource="netview.ilv";
subscribe origin Network:
represent IlsSwTable DomainTable:
# Main Data Source columns
string column[1]="name";
# Collectors
Collector rows=domains->domainRow;
string rowType="Domain,domainRow";
string collectorName="rows";
represent IlsSwTable NodeTable:
# Main Data Source columns
string column[1]="name";
string column[2]="rpStatus";
string rowType="Node,nodeRow";
propagate domains;
subscribe Domain:
represent IlsSwRow domainRow
## draggedPath=domains
:
mandatory Ref<IlsSwTable> table=view.origin->DomainTable;
string column[1]=name;
propagate nodes;
subscribe Node:
represent IlsSwTable InputLineTable when (rpStatus==2):
# Main Data Source columns
string column[1]="name";
string column[2]="from node";
string column[3]="capacity";
# Collectors
Collector rows=inputLines->inputLineRow;
string rowType="Line,inputLineRow";
string collectorName="rows";
represent IlsSwTable OutputLineTable when (rpStatus==2):
# Main Data Source columns
string column[1]="name";
string column[2]="to node";
string column[3]="capacity";
# Collectors
Collector rows=outputLines->outputLineRow;
string rowType="Line,outputLineRow";
string collectorName="rows";
represent IlsSwRow nodeRow
## draggedPath=domains.nodes
:
mandatory Ref<IlsSwTable> table=view.origin->NodeTable;
string column[1]=name;
int column[2]=rpStatus;
propagate inputLines when (rpStatus==2);
propagate outputLines when (rpStatus==2);
subscribe Line:
represent IlsSwRow inputLineRow
## draggedPath=inputLines
:
mandatory Ref<IlsSwTable> table=output->InputLineTable;
string column[1]=name;
string column[2]=input.name;
int column[3]=capacity;
represent IlsSwRow outputLineRow
## draggedPath=outputLines
:
mandatory Ref<IlsSwTable> table=input->OutputLineTable;
string column[1]=name;
string column[2]=output.name;
int column[3]=capacity;
DomainTable and NodeTable are two table representations attached to the origin of the view (Network).

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.