CRecordWebNotifyTableRowClicked
The
To receive this message,
- a listener must be installed for the table: CRecordWebAddTableRowListener
- your target address must be linked to the element ID: CRecordWebRegisterWidgetOwner
The message is part of the
The API is located in the plugin NY_
{ "id": "cc1224b7-86e7-4467-8b7c-6647e24e3021", "name": "WEB_NOTIFY_TABLE_ROW_CLICKED ", "description": "Notification: A table row has been clicked.", "slots": [ { "key": "1", "name": "ID ", "direction": "REQUEST", "mandatory": "true", "type": "STRING", "description": "The ID of the table." }, { "key": "2", "name": "DATA ", "direction": "REQUEST", "mandatory": "true", "type": "STRING_ARRAY", "description": "The data of the table row (column 0-n)." } ] }
Arguments
-
ID : The ID of the table element to which the message belongs. -
DATA : The data of the table row, from column 0-n.
Usage
Register your target address for this ID.
You need to have the
final CWebApi webApi = new CWebApi(this,// your target mRemote Skin Address); webApi.registerWidgets(new String[]{"myElementId"});
Register a listener for an element ID.
webApi.addTableRowListener("myElementId");
Register a message handler for this message.
// constructor: addMessageHandler(CRecordWebNotifyTableRowClicked .ID, this::asyncNotifyTableRowClicked);
Implement the message handler.
private boolean asyncNotifyTableRowClicked(@NotNull final CEnvelope aEnvelope, @NotNull final CRecord aRecord) throws CException { if (aEnvelope.isAnswer()) { return false; } else { final Stringid =CRecordWebNotifyTableRowClicked .getId(aRecord, ""); final String[]data =CRecordWebNotifyTableRowClicked .getData(aRecord, null);// ... aEnvelope.setResultSuccess(); return true; } }