• Post Reply Bookmark Topic Watch Topic
  • New Topic

Rendering XML data in JSF

 
veeresh lakshman
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working on web application with JSF as frontend(view).I introduced a new XML layer in between bean and JSF.At this point i am holding XML data in the form of Stringbuffer.Here comes the problem,how i can render XML data in JSF? or how i can populate XML data in JSF? So is there any way to render XML data in JSF.

Please suggest,any help would be appreciated.

Regards
Veeresh
 
Tim Holloway
Bartender
Posts: 18414
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the core features of JSF is the separation of the View definitions from their rendering processes. It's why I discourage hard-coding HTML in JSF output.

However, if there's a per-page option for selection of renderers, I haven't seen it. Seems to be all-or-nothing.

In any event, what I do in cases like XML and PDF output is to hand off to a non-JSF process. Since JSF doesn't require that each and every request be processed by JSF, I simply use alternative page-handling processes. In the case of XML, I use the SpringServlet for a controller instead of the FacesServlet and a JSPX template for the associated View.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!