CRecordWebListenOnClick2
The message CRecordWebListenOnClick2 adds a click listener to a series of HTML elements.
The message is part of the RemoteSkin Web API.
The API is located in the plugin NY_RemoteSkinWebProtocolAPI.
{
"id": "e0a0cfd5-efdc-4b55-b9dd-0217195d0ff5",
"name": "WEB_LISTEN_ON_CLICK2",
"description": "Listen for onClick and deliver ids.",
"slots": [
{
"key": "1",
"name": "IDS",
"direction": "REQUEST",
"presenceConstraint": "MANDATORY",
"type": "STRING_ARRAY",
"description": "The ids of the widgets to monitor."
}
]
}
Arguments
- IDS : An array of IDs of HTML elements that should all be assigned a click listener.
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.addClickListener2(@NotNull final String[] aIds);
Usage as message
The RemoteSkin target address is also required.
public void addClickListener2(@NotNull final CTargetAddress aRemoteSkinAddress,
@NotNull final String[] aIds) throws CException
{
// Envelope
final CEnvelope env = CEnvelope.forSingleTarget(mRemoteSkinAddress);
// Record
final CRecord record = CRecordWebListenOnClick2.create();
CRecordWebListenOnClick2.setIds(record,
aIds);
// send message
sendNotification(env,
record);
}