CRecordWebAddTableRowListener

The message CRecordWebAddTableRowListener adds a listener to each row of a table.

The message is part of the RemoteSkin Web API.
The API is located in the plugin NY_RemoteSkinWebProtocolAPI.

{
  "id": "9e65346d-7510-4c78-9464-ee6738582a2c",
  "name": "WEB_ADD_TABLE_ROW_LISTENER",
  "description": "Adds a listener to a table row. When the table row is clicked, the data of the row is sent with the message WEB_NOTIFY_TABLE_ROW_CLICKED.",
  "slots": [
    {
      "key": "1",
      "name": "ID",
      "direction": "REQUEST",
      "mandatory": "true",
      "type": "STRING",
      "description": "The ID of the table."
    }
  ]
}

When the table row is clicked, the data of the row is sent with the message CRecordWebNotifyTableRowClicked.

Arguments

  • ID : The ID of the table.

Usage with the helper class CWebApi

The easiest way is to call the corresponding method in the CWebApi class. The use of the class is described there.

mWebApi.addTableRowListener(ID_MY_TABLE);

Usage as message

The RemoteSkin target address is also required.

public void addTableRowListener(@NotNull final CTargetAddress aRemoteSkinAddress,
                                @NotNull final String aIdOfTable) throws CException
    // Envelope
    final CEnvelope env = CEnvelope.forSingleTarget(mRemoteSkinAddress);
    
    // Record
    final CRecord record = CRecordWebAddTableRowListener.create();
    CRecordWebAddTableRowListener.setId(record,
                                        aIdOfTable);
    
    // send message
    sendNotification(env,
                     record);
}

See also: