This may be handled under the ability to programatically render a page, and outstanding issue I'm going to look into.
On Thu, Mar 20, 2008 at 5:43 PM, Joosts Mailing lists <[EMAIL PROTECTED]> wrote: > On 3/21/08, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: > > > > The content type is set as a consequence of what is returned from the > > event handler method. What exactly are you returning? > > When you return a block or a component, Tapestry will send a JSON > > response, with the "content" key set to the character stream derived > > from the partial render. > > > > You can still return a ContentStream type to take control over exactly > > what is sent to the client. > > > > Am I guessing correctly that part of your page is actually a block > > used to generate an XML response? > > > Not really, we are returning an actual page rendering our AJAX response. > > Object getAjaxAwareReturnPage() { > if (isAjaxRequest()) { > return targetingAJAX; > } else { > return null; > } > } > > This seemed like a good hijax approach. Refresh the whole page on no js, > return our updatable components in one page on js enabled. > > I'm guessing T sees a page return as a component and thus transforms this > into a JSON response. I was hoping there is a way to tell tapestry not to > alter the response at all so that I have full control over what is returned. > In the current situation I'm not quite sure how to work with prototypes > response.responseXML because I can't get the page to be returned as > application/XML. Is my architecture wrong or is tapestry missing a > configuration option? > > Thanks for you quick reply, > Joost > > > > On Thu, Mar 20, 2008 at 4:24 PM, Joost Schouten (ml) > > <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > We are in the process of migrating from T5.0.5 to T5.0.11. In our app > > we > > > choose to disable all of T's javascripts and and do all AJAX ourselves. > > > However, Tapestry seems to be a bit too clever in this area and detects > > > our prototype AJAX request, overwrites our > > > @ContentType("application/xml") set on the page our AJAX script > > requests > > > and returns a "application/JSON" response in stead. > > > > > > Is there is simple trick to tell T not to set the contentType to > > > "application/JSON" and not to add the "{content:....}"? > > > > > > Thanks, > > > Joost > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > > -- > > Howard M. Lewis Ship > > > > Creator Apache Tapestry and Apache HiveMind > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]