4 Replies Latest reply on Mar 25, 2007 12:22 PM by moroczt

    Why only with f:verbatim?

    moroczt

      Hello.

      My problem is that I do not know whether is it an error or is 'natural'
      that my JSF pages are rendered as I would like to see them only if I put "simple HTML" codes inside <f:verbatim> in some cases?

      I use JSF 1.1 RI, ajax4jsf-1.1.0, richfaces-3.0.0 (no Facelets, no Tomawk),
      webserver: Tomcat 5.5.23.

      Things work well,but when I write (a very simplified) code like this:

      ...
      <rich:panel >
      <h4 >Please login:</h4>
      <table>
      <tbody>
      <tr>
      <td >Name:</td><td align="left"><h:inputText value="#{mySessionBean.typedName}" /></td>
      </tr>
      </tbody>
      </table>
      </rich:panel>
      ...

      then the <h4>and the table is visible on the HTML page in the browser,but without the JSF components, containing only the text "Name:" . The JSF components are below the html table:
      the "rich panel" (which is light green because I use emeraldTown skin) and inside the panel is located the inputText (input box).

      When use f:verbatim to "protect" html codes then the page is displayed as I expect.

      I would like to know that whether this is a reasonable behaviour regarding the framework versions I use? Is the f:verbatim is the only way to construct pages like this in my environment?
      If I would like to write more nice JSF pages then should I install JSF 1.2 and Facelets?

      Any way I experienced the same with a4j:outputPanel.

      I have another (old) project where i use JSF 1.1+Tiles and "because of the subviews" we have to use verbatim-s, it is OK ,but in this new simple project I do not use Tiles so I would be sad to be forced to use verbatim-s..

      Thank you in advance,

      Tamas


        • 1. Re: Why only with f:verbatim?
          fernando_jmt

          This is not an error, it is IMHO a drawback in JSF 1.1 specification.

          JSF 1.2 and Facelets solves that problem (you can write simple HTML without f:verbatim).

          HTH.

          • 2. Re: Why only with f:verbatim?
            moroczt

            Thank you for the answer.

            i knew that JSF 1.1 is not perfect in this view but I think that there are simpler cases when f:verbatim is not needed.

            It seems that the case I have mentioned is not so simple. :-)


            • 3. Re: Why only with f:verbatim?

              The case is very simple. JSF 1.1 implementation does not allow the pure html content inside the components.

              • 4. Re: Why only with f:verbatim?
                moroczt

                Sorry, now i realized that I should use for example h:panelGrid instead of .
                I do not know why i believed that pure html should work here...i am not a starter... but it seems so :-( Probably i forgot about basics, it was along time ago. I learned it in 2004 . :-)
                And ...well, I have never _reailzed_ that components cannot contain pure html.

                Sorry again, it was not a clever question.

                And thank you for your clear answer.