IlsSwTable
 
IlsSwTable
Category 
Rogue Wave Views Script class
Environment 
Rogue Wave Server/Rogue Wave Views component
Synopsis 
onTableUpdate
getRow
propertySwOnDereference
setRowType
setDefaultCollector
Description 
This class defines an Rogue Wave Server representation object that is a table.
API 
Boolean onTableUpdate(Int colno,
Int rowno,
String value,
Optional Boolean isProperty)
This method changes the value of the corresponding attribute on the server via a call to the function onUpdate on the representation object. The method returns false if the modification is not allowed.
*The optional Boolean argument isProperty can be provided to indicate whether the update should be done on the attribute in the main data source or in the property data source. If this parameter is not specified, the method chooses a value based on the data source that was used to get the table object.
*The rowno and colno arguments indicate which attribute in the server (via the mapping) should be updated. In the Rogue Wave Views Script mapping, column and row numbers start from zero.
*The value parameter is the value of the attribute to be set in the server. This parameter is entered as a string but will be converted to the correct type when used.
Example
var table = ...;
table.onTableUpdate(1, 2, “23”);
 
IlsSwRow getRow(Optional Int rowno)
This method returns the row from the table. If the row number is not provided, the current row is returned. In the Rogue Wave Views Script mapping, row numbers start from zero.
Example
var table = ...
var currentRow = table.getRow();
var firstRow = table.getRow(0);
 
void propertySwOnDereference
(Int colno,
Optional Boolean force,
Optional String arg1,
Optional IlsSwServerDataSource sds,
....
Optional String arg10)
This method dereferences a property in the table if the column colno in the property data source is a hyper-reference. In the Rogue Wave Views Script mapping, column numbers start from zero. If the sds parameter is supplied, it is used to open the new view. If not, the new view is opened with the preregistered panel and Server Data Source, if any.
The optional argument force specifies whether a new view must be instantiated when the same view is already opened on the same object. Its default value is false.
You can pass up to 10 arguments to open the view. These arguments are used as the values of the view parameters.
void setRowType(String SvType, String rowName)
This method sets the type of the row that will be created when a new row is inserted in a table. You must specify the type of the Server object that is associated with the row and the type of the row you want to create. The argument rpObjType is the name specified in the dynamic-view type specification file for the IlsSwRow object you want to create.
This method is useful only for multiple row tables. See the User’s Manual for more information about multiple row tables.
The type of row must be compatible with the default collector used on this table.
Example
The view specification is:
subscribe Domain:
represent IlsSwTable DomainTable:
...
subscribe Node:
represent IlsSwRow nodeRow:
IlsSwTable t = IlsSwGetTable(obj);
t.setRowType("Node", "nodeRow");
void setDefaultCollector(String collector)
This method specifies which collector should be used by default when a new row is added to the table. The argument collector must be the name of the collector you want to use.
This method is useful only for multiple row tables. See the User’s Manual for more information about multiple row tables.
Example
subscribe Node:
represent IlsSwTable NodeTable:
...
Collector rows=inputLines->inputLineRow;
Collector rows1=outputLines->outputLineRow;
If you want to add a row to the second relation, you must call:
IlsSwTable table = IlsSwGetTable(graphic);
table.setDefaultCollector("rows1");
String getDefaultCollector()
This method returns the collector currently used to add a new row.
See Also 
IlsSwRow (Script class)
IlsSwTable (C++ class)

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