Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Overview

The event menu is a dropdown that appears when the user right-clicks on an event in the scheduling component. The menu can be customized with custom actions and icons, allowing users to easily perform actions related to the event.

This feature provides a convenient way for users to interact with events in the scheduling component, allowing them to quickly perform actions such as editing, deleting, or duplicating events. The ability to customize the menu with custom actions and icons adds flexibility to the component, allowing developers to tailor it to the specific needs of their application.

For an example see: event menu

Implementation

To create an event menu, begin by enabling the feature under the "features" tab. Once enabled, you can add one or more menu items.

On click action

Due to certain limitations in the pluggable widget API, we are unable to send the event object as a parameter to the "on click" action defined here. As a workaround, the event can be retrieved from the event ID in the scheduler context.

If you have specified an event ID attribute, you can retrieve the event like this:

[EventId = $SchedulerContext/EventId]

If you haven't set an event ID attribute, the scheduler will populate the scheduler context's eventId attribute with the GUID of the object. Since Mendix doesn't provide an option to retrieve by a GUID string, you can use the provided Java action "JAVA_Get_Object_ByGuid" to accomplish this.

[EventId = $SchedulerContext/EventId]

Icon class

If an icon class is supplied it will be added to the HTML like so:

<i class="b-fa b-fa-arrows-alt" role="presentation"></i>

You can use regular Mendix glyphicons in the icon class, but you can also utilize the Font Awesome 4 library that comes bundled with the scheduler. However, it's important to read up on how to use it properly in:Icons - Fontawesome 4

  • No labels