CRecordWebSetValue
The CRecordWebSetValue message sets the value of an input element.
The message is part of the RemoteSkin Web API.
The API is located in the plugin NY_RemoteSkinWebProtocolAPI.
{
"id": "a13e429c-b6bd-4566-95b4-b803ada225cb",
"name": "WEB_SET_VALUE",
"description": "Set a value of an input element.",
"slots": [
{
"key": "1",
"name": "ID",
"direction": "REQUEST",
"presenceConstraint": "MANDATORY",
"type": "STRING",
"description": "The id of the element."
},
{
"key": "2",
"name": "VALUE",
"direction": "REQUEST",
"presenceConstraint": "MANDATORY",
"type": "STRING",
"description": "The value to set."
}
]
}
Arguments
- ID : The id of the HTML element.
- VALUE : The value to set.
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.setValue(@NotNull final String aId,
@NotNull final String aValue);
Usage as message
The RemoteSkin target address is also required.
public void setValue(@NotNull final CTargetAddress aRemoteSkinAddress,
@NotNull final String aId,
@NotNull final String aValue) throws CException
{
// Envelope
final CEnvelope env = CEnvelope.forSingleTarget(mRemoteSkinAddress);
// Record
final CRecord record = CRecordWebSetValue.create();
CRecordWebSetValue.setId(record,
aId);
CRecordWebSetValue.setValue(record,
aValue);
// send message
sendNotification(env,
record);
}
See also:
Related Pages
CRecordWebListenOnClick2
Adds a click listener to a series of HTML elements. It is part of the RemoteSkin Web API.
CRecordWebLoadImage
Loads an image asynchronously from a FileStore on the network to the FileStore on the web server node. Once the image has been downloaded, the HTML element is updated with the path to the image. It is
CRecordWebRemoveClassesFromElement
Removes one or more classes from an HTML element. It is part of the RemoteSkin Web API.
CRecordWebRemoveElement
Deletes an HTML element. It is part of the RemoteSkin Web API.
CRecordWebRemoveScript
Removes a Javascript element. It is part of the RemoteSkin Web API.
CRecordWebRemoveStyleSheet
Removes a stylesheet. It is part of the RemoteSkin Web API.