Thanks for the responses!

well phooey...I already started down the road for creating my own IEngineService..

i found out I could get to the ASO through the cycle object:
ex:
User user = (User) cycle.getInfrastructure().getApplicationStateManager().get("user");


now I'm stuck because I actually have one other requirement..
I need to access a spring service.

I've got the tapestry-spring addon and I've been injecting that into my pages with ease.

but now I'm not sure how to do it with my IEngineService..

knowing I can override the content type, I might go back and try the a) method.

Unless, ofcourse, there's an easy way to get my spring service into the IEngineService..

Any ideas? Also..under high loads, which method would be more efficient?

thanks,
mike

Jeff Lubetkin wrote:

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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to