IlsSwRow
Category
Dynamic view-related class (Server/Views component)
Inheritance Path
Description
The class IlsSwRow defines an Rogue Wave Server representation object that is a row. This class also defines a set of properties that are described in section IlsSwRow of Chapter Rogue Wave Server/Rogue Wave Views Mapping in the Server User’s Manual.
Library
Synopsis
class IlsSwRow : public IlsRpObject
{
public:
IlsSwRow(IlsRepresentation& repres,const IlsRpObjModel& model);
protected:
IlsSwServerDataSource* ds,
IlsMvValue* argv = 0,
IlsCbArgNb argc = 0,
IlsBoolean force = IlsFalse,
IlsSwOpenViewCallbackType cb=0,
IlsAny arg = 0);
IlsSwServerDataSource* ds,
IlsMvValue* argv,
IlsCbArgNb argc,
IlsMvValue* ackArgv,
IlsCbArgNb ackArgc,
IlsCbArgNb resIndex,
IlsBoolean force = IlsFalse,
IlsSwOpenViewCallbackType cb=0,
IlsAny arg = 0);
protected:
IlsSwServerDataSource* ds,
IlsMvValue* argv,
IlsCbArgNb argc,
IlsMvValue* ackArgv,
IlsCbArgNb ackArgc,
IlsCbArgNb resIndex,
IlsBoolean force = IlsFalse,
IlsSwOpenViewCallbackType cb=0,
IlsAny arg = 0);
public:
IlsSwRowCallbackType,
IlsAny = 0,
IlsSwRow* = 0);
IlsSwRowCallbackType,
IlsAny = 0,
IlsSwRow* = 0);
virtual void
openSwView(const IlsString& viewName,
IlsSwServerDataSource* sds,
IlsMvValue* argv=0,
IlsCbArgNb argc=0,
IlsBoolean force=IlsFalse,
IlsSwOpenViewCallbackType cb = 0,
IlsAny arg = 0);
virtual void
openSwView(const IlsString& viewName,
IlsSwServerDataSource* sds,
IlsMvValue* argv,
IlsCbArgNb argc,
IlsMvValue* ackArgv,
IlsCbArgNb ackArgc,
IlsCbArgNb resultIndex,
IlsBoolean force=IlsFalse,
IlsSwOpenViewCallbackType cb = 0,
IlsAny arg = 0);
IlsTransactionId);
virtual void
endS2CUpdate(IlsS2CTransStatus, IlsTransactionId);
protected:
virtual
setCell(IlsSvInt svIndex, const IliValue& value);
IlsSvInt index,
const IliValue& value);
IlsBoolean transferCallbacks);
};
Constructor
IlsSwRow(IlsRepresentation& repres, const IlsRpObjModel& model);
This constructor is invoked by Server when a new row representation is created.
If you derive this class, you must call this constructor with representation and model arguments.
Destructor
virtual ~IlsSwRow();
This is the protected virtual destructor for this class.
Member Functions
Dereferencing
void swOnDereference(IlvInt colNo,
IlsSwServerDataSource* ds,
IlsMvValue* argv = 0,
IlsCbArgNb argc = 0,
IlsBoolean force = IlsFalse,
IlsSwOpenViewCallbackType cb=0,
IlsAny arg = 0);
This member function can be used to dereference the hyper-reference at the Rogue Wave Views column
colNo. If the column corresponds to a selectable hyper-reference, this method calls the virtual member function
onSwDereference (documented below).
void swOnDereference(IlvInt colNo,
IlsSwServerDataSource* ds,
IlsMvValue* argv,
IlsCbArgNb argc,
IlsMvValue* ackArgv,
IlsCbArgNb ackArgc,
IlsCbArgNb resIndex,
IlsBoolean force = IlsFalse,
IlsSwOpenViewCallbackType cb=0,
IlsAny arg = 0);
This member function performs the same a action as the previous one, but allows you to specify acknowledgement parameters (see
IlsRpObject::onDereference).
[virtual] void onSwDereference(IlsRpAttributeId id,
IlsSwServerDataSource* ds,
IlsMvValue* argv,
IlsCbArgNb argc,
IlsMvValue* ackArgv,
IlsCbArgNb ackArgc,
IlsCbArgNb resIndex,
IlsBoolean force = IlsFalse,
IlsSwOpenViewCallbackType cb=0,
IlsAny arg = 0);
This protected virtual member function dereferences the attribute specified if it is a valid hyper-reference, otherwise it has no effect.
You can specify a Server data source if you want to open the new view from an existing Server data source. If this argument is set to 0, Server looks for a preregistered data source for this view. If none is found, a new panel is created.
You can also specify a callback and its associated data by setting the cb and arg parameters. This callback is called when the view is opened.
You can refer to the functions
IlsSwComponent::openSwView and
IlsRpObject::onDereference for more information.
Accessors
IlsSwTable* getTable() const;
This member function returns the table representation object that owns the row.
IlvInt getRowNumber();
This member function returns the number of the current row in the table. This function is not const because the row number can change if the rows have been sorted or moved. The row number will be available after the end of the first notification cycle for this row.
IlsRpAttributeId colToAttributeId(IlvInt colNumber) const;
This member function returns the attribute identifier for the Rogue Wave Views column number of the row.
Symbols
[static] IlvSymbol* RowCreatedSymbol();
This static member function returns the symbol for the callback that can be called when a row is created.
[static] IlvSymbol* RowDestroyedSymbol();
This static member function returns the symbol for the callback that can be called when a row is destroyed.
Callbacks
[static] void AddCallback(IlvSymbol* symbol,
IlsSwRowCallbackType,
IlsAny = 0,
IlsSwRow* row = 0);
This static member function adds a callback to the row. The parameter symbol identifies which callback is to be added. If the row argument is null, the callback is called for all instances of IlsSwRow.
[static] void RemoveCallback(IlvSymbol* symbol,
IlsSwRowCallbackType,
IlsAny = 0,
IlsSwRow* = 0);
This static member function removes a callback that was previously added using the member function
IlsSwRow::AddCallback.
Opening a View
[virtual] void openSwView(const IlsString& viewName,
IlsSwServerDataSource* sds,
IlsMvValue* argv=0,
IlsCbArgNb argc=0,
IlsBoolean force=IlsFalse,
IlsSwOpenViewCallbackType cb = 0,
IlsAny arg = 0);
[virtual] void openSwView(const IlsString& viewName,
IlsSwServerDataSource* sds,
IlsMvValue* argv,
IlsCbArgNb argc,
IlsMvValue* ackArgv,
IlsCbArgNb ackArgc,
IlsCbArgNb resultIndex,
IlsBoolean force=IlsFalse,
IlsSwOpenViewCallbackType cb = 0,
IlsAny arg = 0);
These member functions open a view on the server object associated with this representation object.
See the virtual member functions IlsSwComponent::openSwView for a description of their arguments.
Notification Cycle
[virtual] IlsBoolean beginS2CUpdate(IlsS2CTransStatus, IlsTransactionId);
This virtual member function, which is inherited from
IlsRpObject, must be called if overriden in an subclass.
[virtual] void endS2CUpdate(IlsS2CTransStatus, IlsTransactionId);
This virtual member function, which is inherited from
IlsRpObject, must be called if overriden in an subclass. This function applies to the Rogue Wave Views data sources all the updates that have been received during the notification cycle.
Other Functions
[virtual] void transferState(IlsSwRow& oldRow, IlsBoolean transferCallbacks);
This protected virtual member function transfers the state of the old row to the row for which this method is called. If the argument transferCallbacks is set to IlsTrue, the callbacks for the current instance are transferred to the new row.
[virtual] void registerProperty(IlvSymbol* s, IlsSvInt index, const IliValue& value);
This virtual member function is called to assign the property defined by s to the Rogue Wave Views table property manager. In the row-creation phase, this property is kept until the end of the notification cycle and applied when the row is inserted into a table.
[virtual] void setCell(IlsSvInt svIndex, const IliValue& value);
This protected virtual member function is called by the server to update the cell matching the svIndex column for the current row. The row in the data source is updated at the end of notification for this row.
See Also
IlsRpObject,
IlsSwComponent,
IlsSwTable, IliValue (Rogue Wave Views/Data Access documentation)
Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.