ICEfaces
  1. ICEfaces
  2. ICE-1710

Facelet View Handler does not handle html markup inside components

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Facelet application with any ICEfaces version
    • Workaround Description:
      just can't use the html markup around the text in these situations. With Seam a lot of their examples come this way to show the change of formatting for code fragments.

      Description

      First noted with <s:link component but when tested also not rendered properly for the following facelet fragment:-

                  <p>Testing view handler without seam components </p>
                     <h:messages globalOnly="true" styleClass="message"/>
                                    
                     <ice:form>
                         
                       <ice:outputLink view="/selectItems.xhtml" name="testMe" >
                               <code>html Code Test</code>
                      </ice:outputLink>
                                        
                     </ice:form>

        Activity

        Hide
        Ted Goddard added a comment -

        Mark, please comment on the root cause of this problem.

        Show
        Ted Goddard added a comment - Mark, please comment on the root cause of this problem.
        Hide
        Mark Collette added a comment -

        It turns out that there isn't really a bug in our Facelets implementation. Rather, OutputLinkRenderer, which is responsible for rendering h:outputLink and ice:outputLink had a peculiarity in its encodeChildren method that kept it from fully recursing down into all of its children. At first I thought this was a bug on our part, but when I looked at the JSF RI 1.2_04 FCS source code, I saw that their OutputLinkRenderer did the same thing. I've posted a message into the JSF RI discussion forum and their dev mailing list asking if this is a bug or is intentional. I haven't gotten a definitive answer yet.

        http://forum.java.sun.com/thread.jspa?messageID=9824110
        https://javaserverfaces.dev.java.net/servlets/BrowseList?listName=dev&from=2007-08-01&to=2007-08-31&count=7&by=date&paged=false

        The reason why this was a problem with ICEfaces + Facelets, and not with stock Facelets is because we hierarchialise HTML tags. So with us "<code>Hello</code>" becomes two components, a UIXhtmlComponent parent for the "code" and a UIInstructions child for the text "Hello". Stock Facelets would make a single UIInstructions component. Since OutputLinkRenderer wasn't recursing properly into rendering grandchild components, only properly rendering child components, it was missing the "Hello" text component.

        Subversion 14666
        icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\OutputLinkRenderer.java

        Show
        Mark Collette added a comment - It turns out that there isn't really a bug in our Facelets implementation. Rather, OutputLinkRenderer, which is responsible for rendering h:outputLink and ice:outputLink had a peculiarity in its encodeChildren method that kept it from fully recursing down into all of its children. At first I thought this was a bug on our part, but when I looked at the JSF RI 1.2_04 FCS source code, I saw that their OutputLinkRenderer did the same thing. I've posted a message into the JSF RI discussion forum and their dev mailing list asking if this is a bug or is intentional. I haven't gotten a definitive answer yet. http://forum.java.sun.com/thread.jspa?messageID=9824110 https://javaserverfaces.dev.java.net/servlets/BrowseList?listName=dev&from=2007-08-01&to=2007-08-31&count=7&by=date&paged=false The reason why this was a problem with ICEfaces + Facelets, and not with stock Facelets is because we hierarchialise HTML tags. So with us "<code>Hello</code>" becomes two components, a UIXhtmlComponent parent for the "code" and a UIInstructions child for the text "Hello". Stock Facelets would make a single UIInstructions component. Since OutputLinkRenderer wasn't recursing properly into rendering grandchild components, only properly rendering child components, it was missing the "Hello" text component. Subversion 14666 icefaces\core\src\com\icesoft\faces\renderkit\dom_html_basic\OutputLinkRenderer.java
        Hide
        Mark Collette added a comment -

        Someone on the dev@javaserverfaces.dev.java.net mailing list recommended that I make a bug report, which I've now done:
        https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=621

        Show
        Mark Collette added a comment - Someone on the dev@javaserverfaces.dev.java.net mailing list recommended that I make a bug report, which I've now done: https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=621

          People

          • Assignee:
            Unassigned
            Reporter:
            Judy Guglielmin
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: