Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Minimal configuration

Scheduler context

First, we need to create a context object for the scheduler. Below are the minimum attributes required in most situations.

...

When creating a context only the StartDate is required. The end date widget will automatically be set by the widget end date based on the current view.

Optional You can also specify a view on the SelectedView attribute (this should be the ID of the view defined in the widget later on). If no SelectedView is set the first view in the list will be used.

Defining views

Once you have placed the scheduler widget inside a page with the scheduler context you can start defining some views.

You must lin fill in the context StartDate and EndDate here and define at least one view.

...

For now, you can choose one of the default views for now , or read up on how to define views in depth here. For now only Only a unique view id and a name for the view is are required, for now.

Adding resources

...

Resources are shown on the left of the widget and for each resource a new row is created. For now only Only a resource datasource data source and the resource id attribute (must be unique!) are required for now. Defining the content of your resources can be done with regular Mendix widgets.

...

Adding events & configuring last moved/new attributes

...

Multiple event data sources are supported. This is convenient when you want to use different event entities or if you have vastly different requirements for your various events in the scheduler. For now, let’s just define a single event data source.

...

The required attributes are a data source, a resource id, and a start and end date, if the event is movable and if it’s resizable.

...

Under UI only the event content is required.

...

Finally, we want to define the actions to call when a user interacts with an event. For the double click action all actions are supported All actions are supported for double-click action, and the scheduler context and event will be passed as a an object parameter. There is however a little more to it for the on-change action.

Creating an on-change microflow

Info

Mendix currently does not support editing list values from a widget (like the event data source we defined).

...

In the example above you can see a sample on of changed microflow. You can see that the SchedulerContext, as well as the Event objects, are input parameters. The Event is never changed by the scheduler but it can however be used to search for the event in the database like so:

Code Block
[id = $Event]

Alternatively, the EventId on the context object can be used (if you supplied an attribute for this (if not it will default to the GUID of the object))

...

This example simply sets the updated values of the SchedulerContext object on the Event object and commits the changes.

License

To try out the scheduler locally on your pc or even in a Mendix sandbox environment doesn’t require a license. However, a production build will.

...