Re: Returning XML or HTML

2012-12-06 Thread Martin Grigorov
A simpler solution is: if (needsXml()) { getRequestCycle().replaceAllRequestHandlers(new TextRequestHandler(text/xml, theXml)) } On Thu, Dec 6, 2012 at 7:55 AM, Sven Meier s...@meiers.net wrote: You'll have to let Wicket know that you wrote the response by yourself. With

RE: Returning XML or HTML

2012-12-06 Thread McDonough, Jonathan
That worked! Thanks a lot Martin -Original Message- From: Martin Grigorov [mailto:mgrigo...@apache.org] Sent: Thursday, December 06, 2012 3:10 AM To: users@wicket.apache.org Subject: Re: Returning XML or HTML A simpler solution is: if (needsXml()) { getRequestCycle

Re: Returning XML or HTML

2012-12-05 Thread Sven Meier
You'll have to let Wicket know that you wrote the response by yourself. With |RestartResponseException| you can switch to another response. In your case you could direct the request to a resource first (since your XML doesn't seem be component-based) and switch to a page in case of missing