On an Ajax request, if you don't return a value, Tapestry sends down an empty JSON object as the response, and the client side is free to ignore that.
On Sat, Oct 16, 2010 at 2:07 AM, Alessio Gambi <[email protected]> wrote: > Hi Thiago, > > thanks! > > I managed to advice the ComponentEventResultProcessor and that was fine for > covering all the cases but one: the void return type. > > In my case, I would like to handle Ajax requests that triggers event method > handlers, which in turn have a void return type, and avoid to render the > page. > Any suggestions ? > > I tried to advice the ImmediateRender without any success (it seems that the > advice is never triggered). I tried with: > @Match("ImmediateRender") > @Match("ImmediateActionRenderResponseFilter") > @Match("Immediate*") > > > I also defined a new filter and then I tried to contribute it the > ComponentEventRequestHandler just before the ImmediateRender. However, in > this case > if the filter Handle the request before immediate render, then the event > handler methods are not invoked at all, while if it tries to call the handle > method then the > request is processed and send back to the client (thus is too late). > > A possible solution is to wrap the Original Response object, let it flows > "normally", and the after all the processing is finished overwriting the > response body. > As you might expect, I do not like this last option. > > Thanks > -- Alessio > > On Oct 13, 2010, at 2:51 PM, Thiago H. de Paula Figueiredo wrote: > >> On Wed, 13 Oct 2010 04:34:13 -0300, Alessio Gambi <[email protected]> >> wrote: >> >>> Hi, >> >> Hi! >> >>> My hope was to contribute to some services such that I can put my own >>> ComponentEventResultProcessor service in front of all the others (like a >>> wrapper or a filter). >> >> You can override it using decoration or advise it. >> >> -- >> Thiago H. de Paula Figueiredo >> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, >> and instructor >> Owner, Ars Machina Tecnologia da Informação Ltda. >> http://www.arsmachina.com.br >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
