Re: Write XML response
I would appreciate very much if some one can tell me how can I use this method, or any other method, to display xml in a panel. I want xml to be displayed in an interactive format in a panel when a form is submitted. Thanks. -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948547.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Write XML response
XML is just another type of markup. If the XML is generated by some service, etc, just use a label to display it. Otherwise, just make your markup FooPanel.xml - put your markup in their, using wicket:id tags as normal, etc. Then in FooPanel.java override getMarkupType and return xml. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:17 PM, m_salmanmohammad_sal...@yahoo.com wrote: I would appreciate very much if some one can tell me how can I use this method, or any other method, to display xml in a panel. I want xml to be displayed in an interactive format in a panel when a form is submitted. Thanks. -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948547.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Write XML response
Thanks for the quick response. Well I am using the label but I get the output as booktitleBook on Logic/titleauthorAristotle/author/book How can I show that in interactive form as shown in a browser? Thanks again. Jeremy Thomerson-5 wrote: XML is just another type of markup. If the XML is generated by some service, etc, just use a label to display it. Otherwise, just make your markup FooPanel.xml - put your markup in their, using wicket:id tags as normal, etc. Then in FooPanel.java override getMarkupType and return xml. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:17 PM, m_salmanmohammad_sal...@yahoo.com wrote: I would appreciate very much if some one can tell me how can I use this method, or any other method, to display xml in a panel. I want xml to be displayed in an interactive format in a panel when a form is submitted. Thanks. -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948547.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948835.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Write XML response
What do you mean interactive form? Most browsers apply their own formatting to a page if the entire response is XML (response header is text/xml) and there is no stylesheet attached. I think that's what you mean - but I'm not sure. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:31 PM, m_salmanmohammad_sal...@yahoo.com wrote: Thanks for the quick response. Well I am using the label but I get the output as booktitleBook on Logic/titleauthorAristotle/author/book How can I show that in interactive form as shown in a browser? Thanks again. Jeremy Thomerson-5 wrote: XML is just another type of markup. If the XML is generated by some service, etc, just use a label to display it. Otherwise, just make your markup FooPanel.xml - put your markup in their, using wicket:id tags as normal, etc. Then in FooPanel.java override getMarkupType and return xml. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:17 PM, m_salmanmohammad_sal...@yahoo.com wrote: I would appreciate very much if some one can tell me how can I use this method, or any other method, to display xml in a panel. I want xml to be displayed in an interactive format in a panel when a form is submitted. Thanks. -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948547.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948835.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Write XML response
What I mean is that I click on the '+' sign and it expands, '-' sign condenses it. I think it is the response header thing. Can that be set for the label? But you do say that has to be for the entire response.. Thanks. Jeremy Thomerson-5 wrote: What do you mean interactive form? Most browsers apply their own formatting to a page if the entire response is XML (response header is text/xml) and there is no stylesheet attached. I think that's what you mean - but I'm not sure. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:31 PM, m_salmanmohammad_sal...@yahoo.com wrote: Thanks for the quick response. Well I am using the label but I get the output as booktitleBook on Logic/titleauthorAristotle/author/book How can I show that in interactive form as shown in a browser? Thanks again. Jeremy Thomerson-5 wrote: XML is just another type of markup. If the XML is generated by some service, etc, just use a label to display it. Otherwise, just make your markup FooPanel.xml - put your markup in their, using wicket:id tags as normal, etc. Then in FooPanel.java override getMarkupType and return xml. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:17 PM, m_salmanmohammad_sal...@yahoo.com wrote: I would appreciate very much if some one can tell me how can I use this method, or any other method, to display xml in a panel. I want xml to be displayed in an interactive format in a panel when a form is submitted. Thanks. -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948547.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948835.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23949030.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Write XML response
It's a feature of older versions of IE - most newer versions show XML with some styling instead. But it is dependent on the entire response being XML - and having text/xml as the response type. So, no, you can't do this for a portion of the page. (barring possibly using an iframe) And, no, you wouldn't want to - it's not a reliable way of displaying information in a cross-browser compatible way. However, I would bet that there are JS libraries out there that take a raw XML string and display it in a pretty way - possibly even with expanding and collapsing nodes, etc. There may even be a Wicket component somewhere that does it - similar to treeview or something - but I don't know of one. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:43 PM, m_salmanmohammad_sal...@yahoo.com wrote: What I mean is that I click on the '+' sign and it expands, '-' sign condenses it. I think it is the response header thing. Can that be set for the label? But you do say that has to be for the entire response.. Thanks. Jeremy Thomerson-5 wrote: What do you mean interactive form? Most browsers apply their own formatting to a page if the entire response is XML (response header is text/xml) and there is no stylesheet attached. I think that's what you mean - but I'm not sure. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:31 PM, m_salmanmohammad_sal...@yahoo.com wrote: Thanks for the quick response. Well I am using the label but I get the output as booktitleBook on Logic/titleauthorAristotle/author/book How can I show that in interactive form as shown in a browser? Thanks again. Jeremy Thomerson-5 wrote: XML is just another type of markup. If the XML is generated by some service, etc, just use a label to display it. Otherwise, just make your markup FooPanel.xml - put your markup in their, using wicket:id tags as normal, etc. Then in FooPanel.java override getMarkupType and return xml. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:17 PM, m_salmanmohammad_sal...@yahoo.com wrote: I would appreciate very much if some one can tell me how can I use this method, or any other method, to display xml in a panel. I want xml to be displayed in an interactive format in a panel when a form is submitted. Thanks. -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948547.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948835.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23949030.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Write XML response
Take a look here: http://www.levmuchnik.net/Content/ProgrammingTips/WEB/XMLDisplay/DisplayXMLFileWithJavascript.html Maybe this is what you want. I found this by searching on Google, but it seems very easy to integrate with wicket, change display colors, etc... Hope it helps. On Tue, Jun 9, 2009 at 9:49 PM, Jeremy Thomerson jer...@wickettraining.comwrote: It's a feature of older versions of IE - most newer versions show XML with some styling instead. But it is dependent on the entire response being XML - and having text/xml as the response type. So, no, you can't do this for a portion of the page. (barring possibly using an iframe) And, no, you wouldn't want to - it's not a reliable way of displaying information in a cross-browser compatible way. However, I would bet that there are JS libraries out there that take a raw XML string and display it in a pretty way - possibly even with expanding and collapsing nodes, etc. There may even be a Wicket component somewhere that does it - similar to treeview or something - but I don't know of one. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:43 PM, m_salmanmohammad_sal...@yahoo.com wrote: What I mean is that I click on the '+' sign and it expands, '-' sign condenses it. I think it is the response header thing. Can that be set for the label? But you do say that has to be for the entire response.. Thanks. Jeremy Thomerson-5 wrote: What do you mean interactive form? Most browsers apply their own formatting to a page if the entire response is XML (response header is text/xml) and there is no stylesheet attached. I think that's what you mean - but I'm not sure. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:31 PM, m_salmanmohammad_sal...@yahoo.com wrote: Thanks for the quick response. Well I am using the label but I get the output as booktitleBook on Logic/titleauthorAristotle/author/book How can I show that in interactive form as shown in a browser? Thanks again. Jeremy Thomerson-5 wrote: XML is just another type of markup. If the XML is generated by some service, etc, just use a label to display it. Otherwise, just make your markup FooPanel.xml - put your markup in their, using wicket:id tags as normal, etc. Then in FooPanel.java override getMarkupType and return xml. -- Jeremy Thomerson http://www.wickettraining.com On Tue, Jun 9, 2009 at 1:17 PM, m_salmanmohammad_sal...@yahoo.com wrote: I would appreciate very much if some one can tell me how can I use this method, or any other method, to display xml in a panel. I want xml to be displayed in an interactive format in a panel when a form is submitted. Thanks. -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948547.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23948835.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Write-XML-response-tp20210589p23949030.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Cristi Manole Nova Creator Software www.novacreator.com
Re: Write XML response
is it not just a matter of setting the right header? -igor On Tue, Oct 28, 2008 at 9:19 AM, [EMAIL PROTECTED] wrote: Hello, I wonder if you can help. I'm trying to send back some XML from an AbstractAjaxBehavior like this: public class MyAjaxBehavior extends AbstractAjaxBehavior { @Override public void onRequest() { String reply = XML document as String. RequestCycle.get().setRequestTarget(new StringRequestTarget(reply)); } } How can I set the response type to text/xml ? The clients get the response okay, but the fact that they don't know it's XML is causing problems in Firefox and Chrome. Many thanks, JHC Ambrose Wheatcroft Analyst / Programmer Email: [EMAIL PROTECTED] London office • Cottons Centre, Cottons Lane, London SE1 2QG • Telephone: +44 (0)20 7367 6500 • Fax: +44 (0)20 7367 6501 This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. This message has been scanned for all known viruses. However, recipients are advised to apply their own antivirus detection measures to this message and any attachments upon receipt. JHC Plc is a limited company registered in England and Wales. Registered number: 2243258. Registered office:Canterbury House, 85 Newhall Street, Birmingham, B3 1LH, England. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Write XML response
Hello, Yes, sorry and thanks - missed the StringRequestTarget(String contentType, String charSet, String content) constrcutor. Thanks again. JHC Ambrose Wheatcroft Analyst / Programmer Email: [EMAIL PROTECTED] London office • Cottons Centre, Cottons Lane, London SE1 2QG • Telephone: +44 (0)20 7367 6500 • Fax: +44 (0)20 7367 6501 From: Igor Vaynberg [EMAIL PROTECTED] To: users@wicket.apache.org Date: 28/10/2008 16:46 Subject: Re: Write XML response is it not just a matter of setting the right header? -igor On Tue, Oct 28, 2008 at 9:19 AM, [EMAIL PROTECTED] wrote: Hello, I wonder if you can help. I'm trying to send back some XML from an AbstractAjaxBehavior like this: public class MyAjaxBehavior extends AbstractAjaxBehavior { @Override public void onRequest() { String reply = XML document as String. RequestCycle.get().setRequestTarget(new StringRequestTarget(reply)); } } How can I set the response type to text/xml ? The clients get the response okay, but the fact that they don't know it's XML is causing problems in Firefox and Chrome. Many thanks, JHC Ambrose Wheatcroft Analyst / Programmer Email: [EMAIL PROTECTED] London office • Cottons Centre, Cottons Lane, London SE1 2QG • Telephone: +44 (0)20 7367 6500 • Fax: +44 (0)20 7367 6501 This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. This message has been scanned for all known viruses. However, recipients are advised to apply their own antivirus detection measures to this message and any attachments upon receipt. JHC Plc is a limited company registered in England and Wales. Registered number: 2243258. Registered office:Canterbury House, 85 Newhall Street, Birmingham, B3 1LH, England. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. This message has been scanned for all known viruses. However, recipients are advised to apply their own antivirus detection measures to this message and any attachments upon receipt. JHC Plc is a limited company registered in England and Wales. Registered number: 2243258. Registered office:Canterbury House, 85 Newhall Street, Birmingham, B3 1LH, England.