Hi, thank you for helping me. Again I had wording issues, it seems. I did know that event handling methods on Tapestry pages and components are written manually. I just wrote "event handlers" because I thought there was something in between the handler methods and the Eventlinks that was generated when an Eventlink is created. Now I have realized that creating an Eventlink amounts to generating the markup for a link with the URL containing the event name. When you then send a request with this URL, Tapestry sees the event and looks for an appropriately named handler in the page/component. I had just thought there was more to it.
As you say in your advice, I expected too much and am now using the method of generating an Eventlink request URL that I give to the tinyMCE editor so that the appropriate request is made at the expected time. I think that is the way to go. I also thought that JavaScript events, HTML DOM events and Tapestry Component Events were the same before. Regards, Daniel P. -----Ursprüngliche Nachricht----- Von: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com] Gesendet: Dienstag, 26. Mai 2015 20:58 An: Tapestry users Betreff: Re: AW: AW: Adding JS to my component combined with using t:If On Tue, 26 May 2015 11:49:20 -0300, Poggenpohl, Daniel <daniel.poggenp...@isst.fraunhofer.de> wrote: > Hi again, Hi! > Jquery can define arbitrary events that can be triggered. I thought I > could raise a JS event and handle it via "onEVENTNAME" on the Tapestry > component side. But of course that doesn't work, probably because no > event handlers are generated because no corresponding eventlink is > created. Event handlers aren't generated at all by Tapestry. You declare them by using @OnEvent or using a naming convention. You just cannot trigger a JS event and expect it to magically trigger a server-side event. Tapestry doesn't need an EventLink or ActionLink to be able to trigger an event handler method in the server-side. You can create your own events and their URLs by using ComponentResources.createEventLink(). With the URL generated by that method, you can invoke them using AJAX in JS. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org