Re: Aw: Re: In which direction is Tapestry heading?
"Thiago H. de Paula Figueiredo" <[email protected]>
| Newsgroups | gmane.comp.java.tapestry.user |
|---|---|
| Message-ID | <CAE_88GaGX8Cs0juVGfnCEi2u1=8c14wx8PTPR65ZDaJ-LZ52=g@mail.gmail.com> |
On Wed, Mar 28, 2018 at 4:47 AM, <[email protected]> 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