Bugger :-/. I didn't know that, thanks. My current JSON response is:
{ "row" : { "validTo" : "30-11-2013", "id" : 19, "imageFilename" : "", "title" : "Jesen", "url2" : "http://blah.com", "validFrom" : "30-10-2013", "active" : true, "url" : "http://www.blah2.com" } } This is the data for the given object / row in the datatable. I tried to do as you and Nathan suggested - changed the method to return void. If I don't return StreamResponse, I get the following JavaScript alert: "DataTables warning (table id = 'najdiEdiDataTable'): Requested unknown parameter 'id' from the data source for row 0" In Firebug it seems I get a response for the zone though: { "zones" : { "boxZone" : "\nMon Nov 04 06:20:47 CET 2013\n" }} But the zone doesn't refresh. Maybe because of the Javascript alert? Is there another way to refresh a zone after I edit a row in a datatable? Regards, Lidija On Wed, Oct 30, 2013 at 4:43 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Wed, 30 Oct 2013 11:49:33 -0200, lidijaldo . <lidija....@gmail.com> > wrote: > > @OnEvent(component = DATATABLE_ID, value = EVENT_EDITOR_EDIT) >> public Object edit(@RequestParameter("action") String action) throws >> Exception { >> >> .... // edit and save object >> >> // refresh module box >> logger.debug("request.isXHR() = " + request.isXHR()); // this >> outputs "true" >> ajaxResponseRenderer.addRender("boxZone", boxZone); >> >> return new TextStreamResponse("application/json", >> response.toString()); >> } >> > > You either use AjaxResponseRenderer.addRender() or return a > StreamResponse, but not both at the same time. It's like trying to give two > answers for the same requests. As you want to refresh a zone, you shouldn't > return a StreamResponse. > > -- > 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 > >