Well.....You "can" go that route if you want to, or you can do it the way
that the new Autocomplete component does it by implementing the IJSONRender
interface:

http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/Autocompleter.java?view=markup

Basically it's another renderComponent() type method, with the difference
being that instead of an IMarkupWriter being passed to you you get a special
JSON syntax writer instead. The method is also only called on "json"
mimetype requests.

On 10/17/06, James Carman <[EMAIL PROTECTED]> wrote:

Once you get the hang of HiveMind, you'll never look back, man (of course
I'm biased because I'm on the HiveMind team).  The "Friendly URLs" stuff
is
just cut/paste into your hivemodule.xml from what I remember.

-----Original Message-----
From: Patrick Moore [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 17, 2006 2:16 PM
To: Tapestry users
Subject: Re: [SPAM] Re: Using tapestry as a Servlet

Hi Kegan --

You can get the registry from any servlet by :

        registry = (Registry)
this.context.getAttribute("org.apache.tapestry.Registry:
"+tapestryServletNam
e);

I suspect doing the engine service might be the more 'correct' way to
go. At the time, I found that hivemind/tapestry documentation in this
matter was scattered and not coherent so I went with the easiest
route. The explaination for how to get 'friendly' urls I found
eye-glazingly confusing to a novice Tap user (myself) and I think that
documentation might be a starting point.


-Pat


On 10/17/06, James Carman <[EMAIL PROTECTED]> wrote:
> If you want to just return "stuff" and not HTML from a page/component,
then
> you can create your own engine service, I would imagine.  The engine
service
> could have anything you want injected into it from within the HiveMind
> registry.
>
> -----Original Message-----
> From: KEGan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 17, 2006 1:31 PM
> To: Tapestry users
> Subject: [SPAM] Re: Using tapestry as a Servlet
>
> Patick,
>
> Could you please elaborate how you do that ? Does it has all the
> auto-property injection into the Servlet?
>
> Thanks.
>
>
> On 10/18/06, Patrick Moore <[EMAIL PROTECTED]> wrote:
> >
> > I just created my own servlet that just accessed the various hivemind
> > services directly. Much less to figure out. Took all of 10 minutes.
> > (well a little more but easier than trying to figure out how to
> > intercept tapestry.
> >
> > On 10/17/06, KEGan <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I am using Tapestry 4.0.2. Most of the time, I am using Tapestry to
> > generate
> > > dynamic HTML pages, so I have all the .html .page .java files for
each
> > page.
> > >
> > > However, sometimes I want to just output some arbitrary text. Such
as
> > XML,
> > > JSON data, or plain text. For XML data, I can probably treat it just
> > like
> > > another HTML page :) But for JSON (or other data), what is the
elegant
> > way
> > > to intercept Tapestry so I could write out my own output ? As if we
> > using
> > > Servlet, getting a OutputStream object and write our own output.
> > >
> > > I read that this could be done in Tapestry 4.1. But since this
version
> > is
> > > not in production release, I would like avoid it. Or should I not?
> > >
> > > Thanks.
> > >
> > > ~KEGan
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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]
>
>

---------------------------------------------------------------------
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]




--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Reply via email to