public interface ClientItemContext extends ClientItemConstants
PROPERTY_FSID, PROPERTY_LANGUAGE, PROPERTY_OBJECT_ID, PROPERTY_PLUGIN, TYPE_INDEX, TYPE_STATUS
Modifier and Type | Method and Description |
---|---|
ClientItem |
createItem(String iconUrl,
String title,
ClientItemPerformable handler)
Creates an action using the given parameters.
|
Object |
getProperty(String name)
Returns the value of the given property, or
null if there is no such property. |
void |
refresh()
Triggers a refresh of the contextual view this action has been registered for,
if the context provides such a functionality.
|
@NotNull ClientItem createItem(@Nullable String iconUrl, @NotNull String title, @NotNull ClientItemPerformable handler)
ClientItem
:
// context: ClientItemContext
var clientItem = context.createItem("iconUrl", "title", function clientItemPerformable() {
// Perform action
});
iconUrl
- The icon to be shown for the action.title
- The title or tooltip of the action.handler
- The handler performing the action.ClientItemsPlugin.getItems(ClientItemContext, JavaScriptObject)
@Nullable Object getProperty(String name)
null
if there is no such property.
// context: ClientItemContext
var fsid = context.getProperty("fsid");
The available properties for the specific context are documented on the context type itself,
like for the FS_INDEX actions on ClientItemConstants.TYPE_INDEX
.name
- The name of the property.null
.void refresh()
// context:ClientItemContext
var clientItem = context.createItem
("iconUrl", "title", function clientItemPerformable() { // Perform action and refresh related view on modification context.refresh(); });
Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210