public interface ClientItemsPlugin
ClientItemsPlugin
:
function clientItemsPluginImpl(context, receiver) { // context:ClientItemContext
// receiver: function(result: Array<ClientItem
>) var items = []; var fsid = context.getProperty
("fsid"); if (fsid) { items.push(context.createItem
("iconUrl", "title", function clientItemPerformable() { // Perform action console.log("Performing action for element with id '" + fsid.getId
() + "'..."); // Refresh related view on modification context.refresh
(); })); } // Send theClientItem
to the caller, so it will be shown in the appropriate context. receiver(items); });
Common.addItemsPlugin(String, ClientItemsPlugin)
Modifier and Type | Method and Description |
---|---|
void |
getItems(ClientItemContext context,
JavaScriptObject callback)
Requests action in the specified context.
|
void getItems(@NotNull ClientItemContext context, @NotNull JavaScriptObject callback)
context
- The context to get actions for.callback
- The callback receiving a list of actions
.ClientItemContext.createItem(String, String, ClientItemPerformable)
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210