because now the ComponentRequestTarget doesn't set any headers i think .
You could implement youre own request target that does this.
and in the response method:
public void respond(final RequestCycle requestCycle)
{
<<<<<<<<<<<<<< set the headers here.. should work.
// Initialize temporary variables
Page page = component.getPage();
if (page != null)
{
page.startComponentRender(component);
}
// Let component render itself
if (component instanceof Page)
{
// Use the default Page request target, if component is a Page
new PageRequestTarget((Page)component).respond(requestCycle);
}
else
{
// Render the component
component.doRender();
}
if (page != null)
{
page.endComponentRender(component);
}
}
We have to see if we must have build in support for this. Or that it has to be done by something else like the AjaxHandler or something?
johan
On 1/21/06, Jim McLaughlin <[EMAIL PROTECTED]> wrote:
Hi,
I'm experimenting with Ajax component rendering using the openrico
library. rico expects the response to be wrapped in xml, ie
<ajax-response><response type="element" id="elementId"> <your/><data/>
</response></ajax-response>
I created a transformer to do this, which works fine, but I also need
to set the mime type to "text/xml". I saw this discussed on the list a
few months back and the consensus was to override the getMarkupType
method, but the object I am ajax rendering is a Panel, and that method
is final. Also, I only want the mime type to be text/xml when ajax
rendering is being performed, and text/html otherwise.
I tried setting it with RequestCycle.get ().getResponse
().setContentType ("text/xml"); but this didn't work. Viewing the
response with LiveHTTPHeaders didn't even show a Content-Type in the
header. I set the content type in the transform method of my
transformer, so maybe this is the problem. Where is the right place to
set the content type?
thx,
jim
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
