Re: Access component via http request

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 17:55:35 -0300, Joel Halbert wrote: Can I access a component out of the context of a page? No. i.e. does a component have to be bound to a Page to be rendered? Yes. -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, develo

Re: Access component via http request

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 18:30:56 -0300, Joel Halbert wrote: I could always embed the Component within an empty wrapper Page and access that via http, but I was hoping this wouldn't be necessary. Component instances only exist inside pages and don't have URLs. -- Thiago H. de Paula Figueiredo I

Re: Access component via http request

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 18:28:14 -0300, Joel Halbert wrote: I don't need to do anything fancy like Page rendering, and infact am just using a Page instance as useful hook for ajax methods. I'd use blocks, single Delegate instance and an onActivate() method to choose the block to be rendered.

Re: Access component via http request

2011-06-30 Thread Joel Halbert
Good question, my rational was that I *might" want need to re-use the template I'm creating inside a Tap Page soon, so I thought I would start off by making the html I need to render a Component (as I could access and render a component directly via an http request). I could always embed the Compo

Re: Access component via http request

2011-06-30 Thread Joel Halbert
hmm, how about using the tapx TemplateAPI and TemplateRenderer within a tapestry app? I don't need to do anything fancy like Page rendering, and infact am just using a Page instance as useful hook for ajax methods. >From this method I just want to return some html rendered with tml, using tap's

Re: Access component via http request

2011-06-30 Thread Markus Feindler
Then, why don't you use a page at all? Can I access a component out of the context of a page? i.e. does a component have to be bound to a Page to be rendered? I'm trying render a simple html template and fetch it from my JS. On Thu, 2011-06-30 at 17:38 -0300, Thiago H. de Paula Figueiredo wrot

Re: Access component via http request

2011-06-30 Thread Howard Lewis Ship
You can ask any component to generate an event request Link using its component resources. In Tapestry, you don't try to second guess, on the client side, what links will look like ... you ask the server side to generate a link, and then your JavaScript code can send Ajax requests to that componen

Re: Access component via http request

2011-06-30 Thread Joel Halbert
Can I access a component out of the context of a page? i.e. does a component have to be bound to a Page to be rendered? I'm trying render a simple html template and fetch it from my JS. On Thu, 2011-06-30 at 17:38 -0300, Thiago H. de Paula Figueiredo wrote: > On Thu, 30 Jun 2011 17:26:35 -0300,

Re: Access component via http request

2011-06-30 Thread Thiago H. de Paula Figueiredo
On Thu, 30 Jun 2011 17:26:35 -0300, Joel Halbert wrote: Hi, Hi! Is it possible to invoke a component directly via HTTP? E.g given a Tapestry Page: public class MyPage { Object onMyRequest() { return something; } } I can call http://myapp/mypage:myrequest/ to return somethin