2014-07-24 21:22 GMT-05:00 Thiago H de Paula Figueiredo <thiag...@gmail.com> :
> On Thu, 24 Jul 2014 20:12:43 -0300, ICE Ernesto Arteaga Zavala < > arterza...@gmail.com> wrote: > > 2014-07-24 17:33 GMT-05:00 Thiago H de Paula Figueiredo < >> thiag...@gmail.com> >> : >> >> On Thu, 24 Jul 2014 19:31:35 -0300, Thiago H de Paula Figueiredo < >>> thiag...@gmail.com> wrote: >>> >>> On Thu, 24 Jul 2014 19:04:09 -0300, ICE Ernesto Arteaga Zavala < >>> >>>> arterza...@gmail.com> wrote: >>>> >>>> Why do you need that? >>>> >>>>> >>>>>> I'll integrate some backbone.js capabilieties, but zones are not the >>>>>> >>>>> better match to do it. >>>>> >>>>> >>>> What exactly? Couldn't you just use query parameters instead of getting >>>> the whole post information and parse it later? >>>> >>>> >>> Even if you're not going to use zones, you can still use Tapestry events >>> and pages and return JSONObject or JSONArray to feed your JavaScript. >>> >> >> >> How can I achieve that using the follow javascript: >> > > First you need to create an URL to pass to your JavaScript code. For > events: > > @Inject > private ComponentResources resources; > ... > String eventUrl = resources.createEventLink("someEventName").toString(); > > Then pass it to your JavaScript code using JavaScriptSupport: script() > (easier), addInitializerCall() or require() (5.4+ only). > > Then you can handle the event: > > @OnEvent("someEventName") > Object handleYourEvent() { > ... > return something; // in your case, it'll probably a JSONObject or > JSONArray. > > } > > Events = Backbone.Collection.extend({ >> >> model: Models.Event, >> name: 'events', >> url : '/events/index.all', >> >> filter : JSON.Stringify(data), >> >> }); >> > > I don't know Backbone, as probably most people in this mailing list, so > you're better off asking how to do x, not how to take some code in Backbone > and adapt it to Tapestry. Yep I know that and that's why I started asking for a particular way to do something, how to get my data from payload?, all the rest is on my own. Actually body request was the last part of the puzzle. I have done the connexion between backbone and tapestry to make dynamic html generation. But is good your interest on what I'm doing. Thanks for you time and your assistance. > > > -- > 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 > > -- Saludos, ------------------------------------------------------------------- "Nada que se consiga sin pena y sin trabajo es verdaderamente valioso." Joseph Addison ------------------------------------------------------------------- ICE Ernesto Arteaga Zavala Ingeniero de Desarrollo