3 Replies Latest reply on Aug 26, 2007 8:01 AM by amayen

    a4j:include problem

    amayen

      Hi!

      I have a problem with the a4j:include tag.

      I have following code:

       <h:panelGroup id="wizard">
       <a:include viewId="/user/test.xhtml" />
       </h:panelGroup>
      


      This code is part of an modalPanel.

      When I load the page I get following exception:

      <span id="j_id17:wizard"><span id="j_id17:j_id18"><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >


      The test.xthml page begins like this:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:a="https://ajax4jsf.dev.java.net/ajax">
      <body>
      
      <ui:composition template="/user/template.xhtml">
      ...
      


      I'm using facelets and I think everything that is not inside the ui:composition tag will be stripped by facelets, however this seems not to
      be the case and the <!DOCTYPE stuff seems to confuse a4j.

      Any suggestions?

      Thanks

        • 1. Re: a4j:include problem

          for the testing purpose:
          if you use ui:include instead of a:include, does the message is the same?

          • 2. Re: a4j:include problem
            amayen

            Hi!

            Yes the problem is the same with <ui:include>.

            Whats interesting is, that in the included file there is no such line
            as <!DOCTYPE ...>, but it may be automatically generated by facelets
            or so.

            Any other hints?

            • 3. Re: a4j:include problem
              amayen

              So, i solved the problem!

              I made an mistake which I now realized:

              I had a main page template that defined tags like html and should therefore
              be the outermost code defined.

              The problem was that I had two pages that used that layout and one of these pages was included into the other one, so this is where the
              <!DOCTYPE ...> came from which was mentioned on the error page.

              Thanks for your reply, anyway!