Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Both JSF 1.1 and JSF 1.2, Facelets

      Description

      From a forum posting, it looks like we might have a regression with the Facelets <ui:debug> tag not working now, and possible it used to work before. We should test with the latest 1.8 DR release, to see if it's broken, and work backwards through previous releases. Here's the documentation on using the <ui:debug> tag:

      https://facelets.dev.java.net/nonav/docs/dev/docbook.html#template-debug

        Activity

        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P2
        Mark Collette made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mark Collette added a comment -

        The postback key is initialised to a specific value for JSF 1.2 environments, but was left null with JSF 1.1, so it's been given a default value, so as not to be null.

        Subversion 18908
        icefaces\core\src\com\icesoft\faces\context\BridgeExternalContext.java

        Show
        Mark Collette added a comment - The postback key is initialised to a specific value for JSF 1.2 environments, but was left null with JSF 1.1, so it's been given a default value, so as not to be null. Subversion 18908 icefaces\core\src\com\icesoft\faces\context\BridgeExternalContext.java
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mark Collette added a comment -

        The NPE is thrown when doing server pushes with JSF 1.1 Basically, when <ui:debug> renders it makes a copy of the RequestParameterMap, which chokes because of a null key. The null key is from PersistentFacesState.execute() putting in the "not reload" value, under the BridgeExternalContext.PostBackKey key, but BridgeExternalContext.PostBackKey is null.

        This is not a problem under JSF 1.2, with or without server push.

        Show
        Mark Collette added a comment - The NPE is thrown when doing server pushes with JSF 1.1 Basically, when <ui:debug> renders it makes a copy of the RequestParameterMap, which chokes because of a null key. The null key is from PersistentFacesState.execute() putting in the "not reload" value, under the BridgeExternalContext.PostBackKey key, but BridgeExternalContext.PostBackKey is null. This is not a problem under JSF 1.2, with or without server push.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18908 Wed May 20 17:00:35 MDT 2009 mark.collette ICE-3952 : Facelets ui:debug
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeExternalContext.java
        Mark Collette made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mark Collette added a comment -

        In your web.xml, make sure you have the actionURLSuffix context-param set, or else you will get NPE.

        <context-param>
        <param-name>com.icesoft.faces.actionURLSuffix</param-name>
        <param-value>.iface</param-value>
        </context-param>

        Show
        Mark Collette added a comment - In your web.xml, make sure you have the actionURLSuffix context-param set, or else you will get NPE. <context-param> <param-name>com.icesoft.faces.actionURLSuffix</param-name> <param-value>.iface</param-value> </context-param>
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Ken Fyten added a comment -

        Jacky in QA reports:

        [Using a test app created by Mandeep using timezone7]
        When tested on tomcat5, I got NPE non-stop. Same one described in the JIRA. On tomcat6, no NPE.
        On FF3, debug window shows xml of page instead of debug screen
        On IE7, a window shows up for a few sec, closes, then save dialog box appears

        Show
        Ken Fyten added a comment - Jacky in QA reports: [Using a test app created by Mandeep using timezone7] When tested on tomcat5, I got NPE non-stop. Same one described in the JIRA. On tomcat6, no NPE. On FF3, debug window shows xml of page instead of debug screen On IE7, a window shows up for a few sec, closes, then save dialog box appears
        Ken Fyten made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mark Collette added a comment -

        This feature has now been ported to ICEfaces. It's been implemented quite differently from stock Facelets, but the result is the same, that the output from the <ui:debug> tag will be served out when the special Facelets UI Debug request is made.

        To use this, just add the <ui:debug> tag to your application, and press CONTROL-SHIFT-D in your app. In Firefox 3 that will also bring up a bookmarking dialog, but you can just cancel that.

        Subversion 18872
        icefaces\core\src\com\icesoft\faces\context\View.java
        icefaces\core\src\com\icesoft\faces\facelets\FaceletsUIDebug.java

        Show
        Mark Collette added a comment - This feature has now been ported to ICEfaces. It's been implemented quite differently from stock Facelets, but the result is the same, that the output from the <ui:debug> tag will be served out when the special Facelets UI Debug request is made. To use this, just add the <ui:debug> tag to your application, and press CONTROL-SHIFT-D in your app. In Firefox 3 that will also bring up a bookmarking dialog, but you can just cancel that. Subversion 18872 icefaces\core\src\com\icesoft\faces\context\View.java icefaces\core\src\com\icesoft\faces\facelets\FaceletsUIDebug.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18872 Wed May 13 13:52:18 MDT 2009 mark.collette ICE-3952 : Facelets ui:debug
        Files Changed
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/facelets/FaceletsUIDebug.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
        Ken Fyten made changes -
        Assignee Priority P3 P2
        Tyler Johnson made changes -
        Salesforce Case [50070000008MJ7i]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 1.8.1 [ 10170 ]
        Assignee Priority P3
        Affects Version/s 1.8 [ 10161 ]
        Security Private [ 10001 ]
        Assignee Mandeep Hayher [ mandeep.hayher ] Mark Collette [ mark.collette ]
        Hide
        Mark Collette added a comment -

        http://www.icefaces.org/JForum/posts/list/12109.page
        Another forum user noticed this issue.

        Show
        Mark Collette added a comment - http://www.icefaces.org/JForum/posts/list/12109.page Another forum user noticed this issue.
        Mandeep Hayher made changes -
        Attachment Correct debug page.jpg [ 11455 ]
        Mandeep Hayher made changes -
        Attachment Incorrect debug page.jpg [ 11454 ]
        Hide
        Mandeep Hayher added a comment - - edited

        Following behaviour was seen when timezone7 (ICEFaces trunk revision# 18187) was tested with ui:debug tag:
        1) on pressing Ctrl+Shift+d a window with url "http://localhost:8080/timezone7/timezone.xhtml?facelets.ui.DebugOutput=1232404227498" was opened. That simple displayed page code (screen shot attached)
        2) Also NullPointerException was seen on Tomcat5 ( Tomcat6 server showed no exceptions)
        Jan 19, 2009 3:35:40 PM com.icesoft.faces.facelets.D2DFaceletViewHandler renderR
        esponse
        SEVERE: Problem in renderResponse: null
        java.lang.NullPointerException
        at java.lang.String.compareTo(String.java:997)
        at java.lang.String.compareTo(String.java:90)
        at java.util.TreeMap.compare(TreeMap.java:1093)
        at java.util.TreeMap.put(TreeMap.java:465)
        at java.util.AbstractMap.putAll(AbstractMap.java:317)
        at java.util.TreeMap.putAll(TreeMap.java:328)
        at java.util.TreeMap.<init>(TreeMap.java:156)
        at com.sun.facelets.util.DevTools.writeVariables(DevTools.java:158)
        at com.sun.facelets.util.DevTools.writeVariables(DevTools.java:144)
        at com.sun.facelets.util.DevTools.debugHtml(DevTools.java:135)
        at com.sun.facelets.tag.ui.UIDebug.writeDebugOutput(UIDebug.java:92)
        at com.sun.facelets.tag.ui.UIDebug.encodeBegin(UIDebug.java:81)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:551)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:559)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:559)
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:559)
        at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:156)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
        at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:175)
        at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:299)
        at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
        at java.lang.Thread.run(Thread.java:595)

        Following behaviour was seen for non icefaces page:

        1)Correct debug page with following url is displayed "http://localhost:8080/timezone7/timezone.jsf?facelets.ui.DebugOutput=1232404864673"
        screen shot attached.
        Following javascipt was seen on the page
        //<![CDATA[
        function faceletsDebug(URL)

        { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 240,top = 212');"); }

        ;var faceletsOrigKeyup = document.onkeyup; document.onkeyup = function(e)

        { if (window.event) e = window.event; if (String.fromCharCode(e.keyCode) == 'D' & e.shiftKey & e.ctrlKey) faceletsDebug('/timezone7/timezone.jsf?facelets.ui.DebugOutput=1232407394406'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); }

        ;
        //]]>

        Show
        Mandeep Hayher added a comment - - edited Following behaviour was seen when timezone7 (ICEFaces trunk revision# 18187) was tested with ui:debug tag: 1) on pressing Ctrl+Shift+d a window with url "http://localhost:8080/timezone7/timezone.xhtml?facelets.ui.DebugOutput=1232404227498" was opened. That simple displayed page code (screen shot attached) 2) Also NullPointerException was seen on Tomcat5 ( Tomcat6 server showed no exceptions) Jan 19, 2009 3:35:40 PM com.icesoft.faces.facelets.D2DFaceletViewHandler renderR esponse SEVERE: Problem in renderResponse: null java.lang.NullPointerException at java.lang.String.compareTo(String.java:997) at java.lang.String.compareTo(String.java:90) at java.util.TreeMap.compare(TreeMap.java:1093) at java.util.TreeMap.put(TreeMap.java:465) at java.util.AbstractMap.putAll(AbstractMap.java:317) at java.util.TreeMap.putAll(TreeMap.java:328) at java.util.TreeMap.<init>(TreeMap.java:156) at com.sun.facelets.util.DevTools.writeVariables(DevTools.java:158) at com.sun.facelets.util.DevTools.writeVariables(DevTools.java:144) at com.sun.facelets.util.DevTools.debugHtml(DevTools.java:135) at com.sun.facelets.tag.ui.UIDebug.writeDebugOutput(UIDebug.java:92) at com.sun.facelets.tag.ui.UIDebug.encodeBegin(UIDebug.java:81) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:551) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:559) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:559) at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:559) at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282) at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:156) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:137) at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:175) at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:299) at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) Following behaviour was seen for non icefaces page: 1)Correct debug page with following url is displayed "http://localhost:8080/timezone7/timezone.jsf?facelets.ui.DebugOutput=1232404864673" screen shot attached. Following javascipt was seen on the page //<![CDATA[ function faceletsDebug(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=600,left = 240,top = 212');"); } ;var faceletsOrigKeyup = document.onkeyup; document.onkeyup = function(e) { if (window.event) e = window.event; if (String.fromCharCode(e.keyCode) == 'D' & e.shiftKey & e.ctrlKey) faceletsDebug('/timezone7/timezone.jsf?facelets.ui.DebugOutput=1232407394406'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); } ; //]]>
        Ken Fyten made changes -
        Field Original Value New Value
        Assignee Mandeep Hayher [ mandeep.hayher ]
        Mark Collette created issue -

          People

          • Assignee:
            Mark Collette
            Reporter:
            Mark Collette
          • Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: