On the other hand, if you'd like to use a), all you have to do (in T4 at
least) is...
@Override
public ContentType getResponseContentType()
{
return new ContentType("text/xml");
}
...in your page class to return the correct MIME type. This is how
Zillow's AJAX XML responses are rendered.
jeff
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, April 07, 2006 7:10 AM
To: 'Tapestry users'
Subject: RE: Outputting XML from Tapestry 4 w/ access to ASOs
b) is cleaner imo. Accessing the ASO is actually simple:
- let hivemind inject the ASO-Manager
- call mgr.get("aso-name") to get the needed aso.
I tend to use c'tor injection like this:
public MyService( ApplicationStateManager asoMgr ) {
this.asoMgr = asoMgr;
}
> -----Original Message-----
> From: Michael Lake [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 07, 2006 5:40 AM
> To: Tapestry users
> Subject: Outputting XML from Tapestry 4 w/ access to ASOs
>
>
>
> Hi
>
> I'm simply trying to use AJAX to import data into a highly customized
> JavaScript.
>
> My requirement is to access an ASO defined in hivemodule.xml
>
> I could go about this two ways:
>
> a) Create a page class and a related .html file which will actually
> output XML.
> My question here is: How can I set the content-type to
> text/xml ?
>
> b) Create my own IEngineService and use the IMarkupWriter to
> construct
> the XML.
> My question for this method is: Is there an easy
> way to access
> my ASO like this?
> I have Kent Tongs book and looking at the file
> upload/download example
> it seems like there is a way to access the ASOs, but it
> looks ugly.
>
>
> Any ideas?
>
> Thanks,
> Mike Lake
>
> ---------------------------------------------------------------------
> 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]