CRecordWebRemoveElement

The message CRecordWebRemoveElement deletes an HTML element.

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

{
  "id": "5d0e42dc-b791-42e8-8652-a642b4bf463c",
  "name": "WEB_REMOVE_ELEMENT",
  "description": "Remove an element.",
  "slots": [
    {
      "key": "1",
      "name": "ID",
      "direction": "REQUEST",
      "mandatory": "true",
      "type": "STRING",
      "description": "The ID of the element to be removed."
    }
  ]
}

Arguments

  • ID : The ID of the element to be removed.

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.removeElement(@NotNull final String aId);

Usage as message

The RemoteSkin target address is also required.

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

See also: