-
1. Re: how to pretty print xml file verbatim
ilya_shaikovsky Jan 12, 2010 1:01 PM (in response to bp2s)try rich:insert. it should fit your needs. -
2. Re: how to pretty print xml file verbatim
bp2s Jan 12, 2010 1:44 PM (in response to ilya_shaikovsky)Ilya,
Thanks very much for your suggestion - it works fine when I use it for specific files on disk, but I tried to pass a string of xml from a backing bean like this:
<rich:insert src="#{Welcome.nodeXML}" highlight="xhtml" />
and it didn't like it. I mentioned here http://community.jboss.org/thread/146637?tstart=30 that I've got a <h:selectOneMenu item and ajax button:
<a4j:commandButton value="Retrieve"
reRender="nodeConfig,currNode,lastOp" onclick="this.disabled=true"
oncomplete="this.disabled=false" />but with the above rich:insert tag in the index.jsp the commandButton doesn't complete so my button stays grey and nothing happens (notably the ajax process causing the revealing of a rich:tab group containing a tab in which is my pretty printed xml).
Does this sound right to you? I thought I read that there are some problems with ajax commandButtons needing to be enclosed, but maybe that's a red herring. Without the tag, it loads fine.
Thanks
-
3. Re: how to pretty print xml file verbatim
bp2s Jan 12, 2010 1:48 PM (in response to bp2s)Sorry the question should have been, must I write the XML out to a file to be able to load it with the rich:insert or is there a faster way to get at XML in memory as per my previous post? -
4. Re: how to pretty print xml file verbatim
ilya_shaikovsky Jan 12, 2010 2:07 PM (in response to bp2s)try to use content attribute -
5. Re: how to pretty print xml file verbatim
bp2s Jan 13, 2010 6:37 AM (in response to ilya_shaikovsky)Ilya - many thanks that sorted it.