On Thu, Dec 13, 2018 at 11:04 PM Christopher Dodunski < chrisfromtapes...@christopher.net.nz> wrote:
> Hi all, > Hello! > I had mistakenly thought that any event handler method could render a > response through return type, whereas seemingly this is unique to events > triggered by Tapestry's actionlink, eventlink and form components. > I'm afraid you're mistaken about being mistaken. :) There's absolutely no difference between event handler methods from Tapestry components or your own components. You just have limits on which return types are accepted for AJAX requests (as determined by Request.isXHR()) and non-AJAX requests. > I developed a filter pane component for limiting the number and (date) > range of hibernate results displayed. The idea was for this pane to > trigger a "filter" event - componentResources.triggerEvent("filter", null, > null) - causing the container to refresh the zone that contains the > results. But invoking onFilter() produces the error: "This type of event > does not support return values from event handler methods." > This matches what I said before. What did you return on onFilter()? > What is the usual method for triggering events so that a handler method > renders a response based on return type (zone body in my case)? > In the end, it boils down to the registered ComponentEventResultProcessor instances. You can contribute your own ones to the ComponentEventResultProcessor service. -- Thiago