Mailing List Message #142
From: Michele Varano <>
Subject: BuildURL
Date: Thu, 15 Apr 2021 20:52:29 +0200
To: <>
Hello all

I have a JavaScript based calendar " FullCalendar V5 / "
which I build in Java via script.
So far no problem, but now I want to display my events dynamically/ fetch them from
the DB depending on the custom filter
One option I saw in the doc is to fetch the events via function,
which is called whenever the calendar needs new dates/events,

Example from doc:


  events: function(start, end, timezone, callback) {
      url: 'myxmlfeed.php',
      dataType: 'xml',
      data: {
        // our hypothetical feed requires UNIX timestamps
        start: start.unix(),
        end: end.unix()
      success: function(doc) {
        var events = [];
        $(doc).find('event').each(function() {
            title: $(this).attr('title'),
            start: $(this).attr('start') // will be parsed


import { req } from 'superagent'; // ajax library

var calendar = new Calendar(calendarEl, {

  events: function(info, successCallback, failureCallback) {
        start: info.start.valueOf(),
        end: info.end.valueOf()
      .end(function(err, res) {

        if (err) {
        } else {

   // convert to array
            ).map(function(eventEl) {
              return {
                title: eventEl.getAttribute('title'),
                start: eventEl.getAttribute('start')


My question now is, how do I build the URL so that I can call
an action method, perhaps with parameters, in my component?
Or maybe you have a better idea how to do this:)

Many Thanks

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster