Class RenderConlet

All Implemented Interfaces:
Future<Void>, Associator, Eligible

public class RenderConlet extends ConsoleCommand
A console command for conlet rendering.

Sent to the web console page for adding or updating a complete web console component representation. The actual content (the HTML) is passed to the constructor as a Future, allowing the content to be evaluated in parallel to the event handling.

The content must be valid HTML, usable as inner HTML of a block level element (typically a div). If the root element has an attribute data-conlet-title, its value overrides the default title (the display name of the conlet type, see AddConletType.displayNames()).

The content provided is searched for attributes data-jgwc-on-load and data-jgwc-on-unload which must have as value the name of a function. When the HTML has been loaded or unloaded (i.e. added to the DOM or removed from the DOM), the respective functions are invoked with the element containing the attribute as their first parameter. A second boolean parameter is true if the on-load function is called due to an update of an already existing container.

The HTML elements of edit dialogs (Conlet.RenderMode.Edit) can have an additional attribute data-jgwc-on-apply which must have as its value the name of a function. This function is invoked when changes made in the form must be applied (e.g. before the dialog is closed).