Rogue Wave Server/Rogue Wave Views Integration > Server/Views Mapping > Server/Views Representation Model > IlsSwRow
 
IlsSwRow
Description
Instances of the class IlsSwRow are representation objects that represent each server object by a row in an Rogue Wave Views memory table attached to a Main data source. No IlsSwRow representation object can exist without an IlsSwTable representation object to which this row is attached. Rows represent server objects that are the target of the relation represented by the associated table.
Any row is fully described by two of its representation attributes:
*table: Indicates the parent table to which the row belongs. When the row representation object is created by the server as an instance of the class IlsSwRow, the following constructor is used:
IlsSwRow(IlsRepresentation& r, const IlsRpObjModel& om);
At this stage, no more is known about the row. Since the protocol between Rogue Wave Server and the component is generic (that is, must work regardless of the mapping), the model interpreter needs a constructor with a predefined signature.
An row representation object is constructed in two steps:
*First, an “empty” IlsSwRow object is created.
*Then, the missing values are filled in by setting attribute values. The first attribute to be set is the table attribute. Without it, an IlsSwRow object cannot do anything meaningful (like adding itself to its parent table) because this is how the model is designed (see the mandatory keyword in the .ilv or .ils file).
*column[] (any type): This attribute that controls the data type of columns in the table. Unlike the column[] attribute of IlsSwTable, this attribute can be of any type since it contains the value of anything that is in the corresponding data source. While the column[] attribute for IlsSwTable will most likely be filled with constant strings, the column[] attribute for IlsSwRow is mapped to server object attributes. As a result, the table represents several server objects (one per row).
Note: The order of the table and column[] attributes in view specifications is significant.
When a row is notified in creation from the server, that row becomes actually attached to the table. Its row number is –1 until after the first notification cycle, —that is, after the first call to the function IlsSwRow::endS2CUpdate. From then on, it receives a rowNumber attribute.
When a row is notified in update, all the column values are buffered until the end of the notification for this row. The table is updated only when the function endS2CUpdate is called.
Predefined Properties
All non-indexed predefined properties are applied to the entire row in the Rogue Wave Views memory table. All indexed predefined properties are applied to a specific cell in the Rogue Wave Views memory table.
Row Representation Attributes
*editRight (boolean): Specifies whether the row can be modified.
*editRight[] (boolean): Specifies which columns in the row can be modified.
Views Table Graphical Properties
These properties are Views table properties and use the property manager attached to the table to manage graphical attributes of any attached gadgets. These properties are managed by a set of rules defined by the property manager.
See the Rogue Wave Views documentation about the property manager.
*background (string): Specifies the background color of the row
*foreground (string): Specifies the foreground color of the row
*font (string): Specifies the font used by the row
*background [] (string): Specifies the background color of a cell
*foreground [] (string): Specifies the foreground color of a cell
*font [] (string): Specifies the font used by the cell
If you plan to add row properties, keep in mind that no row exists in the Rogue Wave Views memory table until the end of the first notification for the corresponding object. Therefore, you cannot use the Views table property manager until that point. As properties are often notified during the first notification cycle (because in most cases they are constant), you can use the member function IlsSwRow::registerProperty to register your property to this row. Rogue Wave Server will apply this property to the property manager of the Views table as soon as the row exists in that table.
Callbacks
*RowCreatedSymbol
This callback is called during execution of the member function IlsRpObject::afterInit—that is, after the constructor of IlsSwRow.
The row has not been assigned any row number yet at this stage.
*RowDestroyedSymbol
This callback is called from the destructor of IlsSwRow. You cannot call virtual functions on this object anymore.

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.