CRecordWebShowModal
The CRecordWebShowModal message shows a modal dialog.
The message is part of the RemoteSkin Web API.
The API is located in the plugin NY_RemoteSkinWebProtocolAPI.
{
"id": "df92f998-f2ad-484c-aac5-5e714bc7996c",
"name": "WEB_SHOW_MODAL",
"description": "Show a modal dialog.",
"slots": [
{
"key": "1",
"name": "ID",
"direction": "REQUEST",
"presenceConstraint": "MANDATORY",
"type": "STRING",
"description": "The id of the dialog."
}
]
}
Arguments
- ID : The id of the dialog HTML element (usually a
div).
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.showModal(@NotNull final String aId);
Usage as message
The RemoteSkin target address is also required.
public void showModal(@NotNull final CTargetAddress aRemoteSkinAddress,
@NotNull final String aId) throws CException
{
// Envelope
final CEnvelope env = CEnvelope.forSingleTarget(mRemoteSkinAddress);
// Record
final CRecord record = CRecordWebShowModal.create();
CRecordWebShowModal.setId(record,
aId);
// send message
sendNotification(env,
record);
}
Example for a modal dialog (using UIkit)
The following dialog is the "YesNo Dialog" used by the UserManager.
The tag {message} is replaced by the message to be displayed. The HTML code
is then inserted into the web page using setInnerHtml and
showModal() is called.
{message}