On Wed, Mar 28, 2018 at 4:47 AM, <peter.sk...@ooom.at> wrote:

> Hallo Reinhold,
>

Hello!


> Tapestry can be used without classical forms. If you have to include the
> form
> component because of the dependence of the input components on it,
> suppress its
> default action.
>
> On the client side you can use any DOM event to trigger an Ajax action. A
> typical
> event handler can look like this:
>

Nice example! Thanks!


>
> var someEventHandler = function(ev) {
>   var pars =  {date: dateSelected, time: timeSelected, lid: lid };
>   var ciphered = reg.aesCipher( JSON.stringify(pars));
>   $.ajax({
>     url: "xxx.tapestry.event.handler.url",
>
    method: "POST",
>     data: { ciphered: ciphered }
>   }).success( function( response) {
>

This part, specifically finding the URL of the event handler, can be
simplified a lot by using @PublishEvent and
http://tapestry.apache.org/ajax-and-zones.html#AjaxandZones-Invokingserver-sideeventhandlermethodsfromJavaScript
.

-- 
Thiago

Reply via email to