Re: MX4J and AJAX

"Simone Bordet" <[email protected]>
Newsgroups gmane.comp.java.mx4j.user
Message-ID <[email protected]>
Hi !

> Anyone doing any AJAX programming using MX4J?
>
> In the web app I'm working on, I've done one little function call - a
> unit conversion routine - using the Taconite framework
> (http://taconite.sourceforge.net).  It seems to work very well.  My
> technique is to render the page/form, then any button that requires an
> MX4J interaction calls a JavaScript routine that builds the object,
> method, and arguments required by MX4J.  The JMX method is invoked via
> the XMLHttpRequest(), the "identity" result is returned to the web app,
> and JavaScript handles rendering the results where they go.
>
> The combination of MX4J and AJAX seems to fit together very well.  The
> only problem I had is that Taconite expects the Content-Type to be
> "text/xml" and MX4J always returns "text/html".  I got around this by
> making a slight change to Taconite so that it doesn't parse the result
> into a DOM.  This has the negative side effect that the result can't be
> treated as a Document, but it works for me.  It'd be nice if MX4J
> allowed the Content-Type to be set, or at least returned "text/xml" for
> the identity transformation.

Great (and glad) you're mixing ajax and mx4j !
The content-type seems to be hardcoded in XSLTProcessor.writeResponse().
Can you please file a RFE for this change, so we keep track of it ?

Thanks !

Simon
--
http://bordet.blogspot.com


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.