CRecordWebLoadImage
The
The message is part of the
The API is located in the plugin NY_
{ "id": "484ecbf3-636f-4bff-8571-aa9fbc215ff7", "name": "WEB_LOAD_IMAGE ", "description": "Load an image and update the HTML element after loading.", "slots": [ { "key": "1", "name": "RELATIVE_PATH ", "direction": "REQUEST", "mandatory": "true", "type": "STRING", "description": "The relative path of the image." }, { "key": "2", "name": "ELEMENT_ID ", "direction": "REQUEST", "mandatory": "true", "type": "STRING", "description": "The ID of the element to update." } ] }
Arguments
-
RELATIVE_PATH : All files in a FileStore are identified by a relative path.
Example: “/app/MyApp/images/goofy.png” -
ELEMENT_ID : The element ID to update.
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.loadImage(@NotNull final StringaRelativePath , @NotNull final StringaElementId );
Usage as message
The
public void loadImage(@NotNull final CTargetAddressa , @NotNull final StringRemote Skin AddressaRelativePath , @NotNull final StringaElementId ) throws CException {// Envelope final CEnvelope env = CEnvelope.forSingleTarget(m );Remote Skin Address// Record final CRecord record =CRecordWebLoadImage .create();CRecordWebLoadImage .setRelativePath(record,aRelativePath );CRecordWebLoadImage .setElementId(record,aElementId );// send message sendNotification(env, record); }