Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF Newbie Question

James Iuliano
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope this doesn't sound too whacked out...

I'm working with an in-house developed M-V-C framework that allows for creating UI components, similar to Faces.

Our UI components can be rendered using JSP, and can include event clicks within the component.

As a prototype/POC, I am attempting to take one of our UI components and turn it into a Faces component.

I have one of two options as far as rendering goes:

1. Create a JSF Renderer that can do a JSP include so that a JSP can be used as the rendering for a component. The usual RequestDispatcher.include is not working - the component HTML gets rendered before even the <html> element for the page containing it. There is some sort of out of synch flushing issue here.

Even wierder is that if I include <h:commandLink> elements in the "renderer" JSP, they successfully render within the <body> of the page while the rest of the HTML comes out on top.

2. Convert the JSP to ResponseWriter.write Java calls. The problem here is that I do not know what the equivalent Java code would be for the JSP
tab <h:commandLink> so that the user can click to fire an event.

Option 1 is much easier since I already have the JSP, but can someone explain what I must do to make either or both of these options work?


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic