CRecordWebDeregisterWidgetOwner
Browser messages are always associated with an HTML element ID. If you registered element IDs using the CRecordWebRegisterWidgetOwner message, you need to deregister them when your service is deleted. You can either deregister specific element IDs or all IDs linked to your microservice.
The message is part of the RemoteSkin Web API.
The API is located in the plugin NY_RemoteSkinWebProtocolAPI.
{
"id": "43e176e2-e502-4cce-aedf-1ce5ab35aa0b",
"name": "WEB_DEREGISTER_WIDGET_OWNER",
"description": "Deregister a widget owner.",
"slots": [
{
"key": "1",
"name": "WIDGET_IDS",
"direction": "REQUEST",
"presenceConstraint": "OPTIONAL",
"type": "STRING_ARRAY",
"description": "Optional: The IDs of HTML widgets to deregister.\nIf missing, all widgets for this address will be deregistered."
}
]
}
Usage
Deregister all element IDs
The RemoteSkin target address is also required.
public void deregisterWidgetOwner(@NotNull final CTargetAddress aRemoteSkinAddress) throws CException
{
final CEnvelope env = CEnvelope.forSingleTarget(aRemoteSkinAddress);
final CRecord record = CRecordWebDeregisterWidgetOwner.create();
sendNotification(env,
record);
}
Deregister some element IDs
The RemoteSkin target address is also required.
public void deregisterSomeElementIds(@NotNull final CTargetAddress aRemoteSkinAddress,
final String @NotNull [] aWidgetIds) throws CException
{
final CEnvelope env = CEnvelope.forSingleTarget(aRemoteSkinAddress);
final CRecord record = CRecordWebDeregisterWidgetOwner.create();
CRecordWebDeregisterWidgetOwner.setWidgetIds(record,
aWidgetIds);
sendNotification(env,
record);
}