1 Reply Latest reply on Nov 10, 2008 7:41 PM by Mikael Andersson

    Handling RAW HTML in Seam?

    Paul Keogh Novice


      I have a seam component that uses HTTPClient to retrieve a web page. This works fine and I can display the return HTML string using a h:outputText element.

      Can someone tell me (or point me at) how to open a new window/frame to display the returned page ? This sounds simple to me, but I cannot find any references or samples on how to do it.


        • 1. Re: Handling RAW HTML in Seam?
          Mikael Andersson Master

          How about something like this.

          In the page that opens up the new page:

          <h:outputLink value="/showContent.jsf" target="_blank">
          <f:param name="param" value="#{someBean.someValue}"/>

          The backing bean behind the showContent.jsf page :

          public class ShowContentBacking .... {
          String reqParam;
          private String htmlString;
          public void init(){
              htmlString = //HttpClient call using the reqParam
          // getters and setters

          Then just create a showContent.xhtml page which gets the htmlString from the event scoped backing bean.

          Just typed the stuff in here so there are probably loads of errors.