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: "Aaron Rosenzweig" Received: from mail-qt1-f170.google.com ([209.85.160.170] verified) by selbstdenker.ag (CommuniGate Pro SMTP 6.3.3) with ESMTPS id 25729543 for webobjects-dev@wocommunity.org; Thu, 15 Apr 2021 22:04:22 +0200 Received-SPF: none receiver=post.selbstdenker.com; client-ip=209.85.160.170; envelope-from=recurve@cocoanutstech.com Received: by mail-qt1-f170.google.com with SMTP id t11so10596197qtr.8 for ; Thu, 15 Apr 2021 13:04:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chatnbike.com; s=chatnbike; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=db4S4LLIRlm2DnIDw4bKYWMvbzwu7/8UygodvtAmb+0=; b=ExziiwB7a8qeCSDznyflCNlBOg8YwrAtjtZCwmVKF/4j6P+XKnwlRqDyc71qR25tYb J7hi54sup9TP+ROA7/DMtM4lmK2iyCQ61RAZsrtWPTw9uHOQa6w4eBNUOq1bzBjAcwBl YOPMgCqEMLWenTWmK2s2gWr+zLaA6QHE7S3y4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=db4S4LLIRlm2DnIDw4bKYWMvbzwu7/8UygodvtAmb+0=; b=CncI1B1zWLfrIARxiolWPY5BL1vfG6xfukUUMCFKLEl7NOWYo0Gncf2hBU11XVB0ZQ IX1vKsNVOpLadNwIg+69IG8Hp4yKJ40qXuY15CDjt9cun4h+SD0DghCWztyG8vs8mkrM NvEwS07o1m6uV6zd6em0gkABgaFHJptFscI4HG9mnXyHJjCB97yZu/KeH7qOgHRGDGmb MTcXOqXqv5jI1giy+J3qkjFEH5U8IoL/5uqZclH5HTfh46pmQeQyfdFydhQQNnwBdtO4 /hG91kgPn/Agw6rn2vkDw7OFFbVAIQFXJI4cYXBOBwXyASmBncE55/jQTztGM1KzSsGI tjag== X-Gm-Message-State: AOAM53055MUEl9xrMDOwb5ZLeOoqqo12zMCR9Od8KbsFa2nfTmBsVYFG PHoOsv/67W3RbWzcyfEnDvs3MJdnJXIMyPm9pG0= X-Google-Smtp-Source: ABdhPJy6SsfoBNG3kW8IXEuestWD9PJR9Ikh+0nKPzoWpXjigwI8D58cXhNyfyaQq9ooIo0fq/eX7g== X-Received: by 2002:ac8:6bd5:: with SMTP id b21mr4712440qtt.269.1618517040771; Thu, 15 Apr 2021 13:04:00 -0700 (PDT) Return-Path: Received: from mac-pro.lan (pool-173-79-35-204.washdc.fios.verizon.net. [173.79.35.204]) by smtp.gmail.com with ESMTPSA id q205sm2756565qka.99.2021.04.15.13.04.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Apr 2021 13:04:00 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: [WO-DEV] BuildURL Date: Thu, 15 Apr 2021 16:04:06 -0400 References: To: WebObjects & WOnder Development In-Reply-To: Message-Id: <2767EEC5-C9ED-4AAC-B27E-0F233FE8E000@chatnbike.com> X-Mailer: Apple Mail (2.3654.60.0.2.21) Perhaps you can create a =E2=80=9CDirectAction=E2=80=9D instead of = trying to do it with a component action. Make methods in = DirectAction.java. This might be your first cut.=20 Another option is to create REST routes (ERRest) - which are a = specialized direct actions. This might be your second cut.=20 > On Apr 15, 2021, at 2:52 PM, Michele Varano = wrote: >=20 > Hello all >=20 > 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, >=20 > Example from doc: >=20 > THE OLD VERSION >=20 > $('#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); > } > }); > } > }); >=20 > THE NEW VERSION >=20 > import { req } from 'superagent'; // ajax library >=20 > var calendar =3D new Calendar(calendarEl, { >=20 > events: function(info, successCallback, failureCallback) { > req.get('myxmlfeed.php') > .type('xml') > .query({ > start: info.start.valueOf(), > end: info.end.valueOf() > }) > .end(function(err, res) { >=20 > if (err) { > failureCallback(err); > } else { >=20 > successCallback( > Array.prototype.slice.call( // convert to array > res.getElementsByTagName('event') > ).map(function(eventEl) { > return { > title: eventEl.getAttribute('title'), > start: eventEl.getAttribute('start') > } > }) > ) > } > }) > } >=20 > }); >=20 > 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:) >=20 > Many Thanks >=20 > Michele > ############################################################# > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to = > To switch to the INDEX mode, E-mail to = > Send administrative queries to = >=20