X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.22.2a (ClamAV engine v0.102.2) X-Junk-Score: 0 [] X-KAS-Score: 0 [] From: "Michele Varano" Received: from miniserver.rucotec.ch ([213.189.151.242] verified) by post.selbstdenker.com (CommuniGate Pro SMTP 6.3.3) with ESMTPS id 25729446 for webobjects-dev@wocommunity.org; Thu, 15 Apr 2021 20:52:51 +0200 Received-SPF: none receiver=post.selbstdenker.com; client-ip=213.189.151.242; envelope-from=michele.varano@rucotec.ch Received: from localhost (localhost [127.0.0.1]) by miniserver.rucotec.ch (Postfix) with ESMTP id 58B9127CCBEA for ; Thu, 15 Apr 2021 20:52:31 +0200 (CEST) Received: from miniserver.rucotec.ch ([127.0.0.1]) by localhost (miniserver.rucotec.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GPuzevN0eY3h for ; Thu, 15 Apr 2021 20:52:30 +0200 (CEST) Received: from [192.168.1.241] (xdsl-188-154-232-227.adslplus.ch [188.154.232.227]) by miniserver.rucotec.ch (Postfix) with ESMTPSA id A33E127CCBDE for ; Thu, 15 Apr 2021 20:52:30 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.17\)) Subject: BuildURL Message-Id: <2F33283E-EB09-4436-BB2E-50DF76BB7B6F@rucotec.ch> Date: Thu, 15 Apr 2021 20:52:29 +0200 To: webobjects-dev@wocommunity.org X-Mailer: Apple Mail (2.3445.104.17) Hello all I have a JavaScript based calendar " FullCalendar V5 / = https://fullcalendar.io/docs/v3/events-function "=20 which I build in Java via script.=20 So far no problem, but now I want to display my events dynamically/ = fetch them from=20 the DB depending on the custom filter=20 One option I saw in the doc is to fetch the events via function,=20 which is called whenever the calendar needs new dates/events, Example from doc: THE OLD VERSION $('#calendar').fullCalendar({ events: function(start, end, timezone, callback) { $.ajax({ url: 'myxmlfeed.php', dataType: 'xml', data: { // our hypothetical feed requires UNIX timestamps start: start.unix(), end: end.unix() }, success: function(doc) { var events =3D []; $(doc).find('event').each(function() { events.push({ title: $(this).attr('title'), start: $(this).attr('start') // will be parsed }); }); callback(events); } }); } }); THE NEW VERSION import { req } from 'superagent'; // ajax library var calendar =3D new Calendar(calendarEl, { events: function(info, successCallback, failureCallback) { req.get('myxmlfeed.php') .type('xml') .query({ start: info.start.valueOf(), end: info.end.valueOf() }) .end(function(err, res) { if (err) { failureCallback(err); } else { successCallback( Array.prototype.slice.call( // convert to array res.getElementsByTagName('event') ).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=20 an action method, perhaps with parameters, in my component? Or maybe you have a better idea how to do this:) Many Thanks Michele=