ICEfaces
  1. ICEfaces
  2. ICE-5717

Customized renderer for UIDebug component

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Alpha2
    • Fix Version/s: 2.0-Alpha3, 2.0.0
    • Component/s: Framework, ICE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2 JSF 2
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration

      Description

      As of Mojarra 2.0.2, the ui:debug component causes difficulty for ICEfaces due to the fact that it typically lives as a child of the body without an id. This leads to ViewBody updates when they may not be necessary as the script dynamically changes. We should override the renderer to provide a containing component (e.g. span) with an id.

        Issue Links

          Activity

          Hide
          Judy Guglielmin added a comment -

          markup without panelgroup around the <ui:debug> tag:-

          <!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"><head>
          <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
          <title>ICEfaces Ajax</title><script src="/debugtag/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development" type="text/javascript"></script><script src="/debugtag/javax.faces.resource/bridge.js.jsf?a15523980" type="text/javascript"></script></head><body><script language="javascript" type="text/javascript">
          //<![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) == 'P' & e.shiftKey & e.ctrlKey) faceletsDebug('/debugtag/icefaces.jsf?facelets.ui.DebugOutput=1273866987816'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); };
          //]]>
          </script>

          <form action="/debugtag/icefaces.jsf" enctype="application/x-www-form-urlencoded" id="form1" method="post" name="form1">
          <input name="form1" type="hidden" value="form1" />
          ...

          markup with panelgroup surrounding <ui:debug> tag:_
          <!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"><head>
          <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
          <title>ICEfaces Ajax</title><script src="/debugtag/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development" type="text/javascript"></script><script src="/debugtag/javax.faces.resource/bridge.js.jsf?a2949976" type="text/javascript"></script></head><body><span id="debugId"><script language="javascript" type="text/javascript">
          //<![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) == 'P' & e.shiftKey & e.ctrlKey) faceletsDebug('/debugtag/icefaces.jsf?facelets.ui.DebugOutput=1273871183676'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); }

          ;
          //]]>
          </script>
          </span>
          <form action="/debugtag/icefaces.jsf" enctype="application/x-www-form-urlencoded" id="form1" method="post" name="form1">
          <input name="form1" type="hidden" value="form1" />

          Show
          Judy Guglielmin added a comment - markup without panelgroup around the <ui:debug> tag:- <!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"><head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /> <title>ICEfaces Ajax</title><script src="/debugtag/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development" type="text/javascript"></script><script src="/debugtag/javax.faces.resource/bridge.js.jsf?a15523980" type="text/javascript"></script></head><body><script language="javascript" type="text/javascript"> //<![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) == 'P' & e.shiftKey & e.ctrlKey) faceletsDebug('/debugtag/icefaces.jsf?facelets.ui.DebugOutput=1273866987816'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); }; //]]> </script> <form action="/debugtag/icefaces.jsf" enctype="application/x-www-form-urlencoded" id="form1" method="post" name="form1"> <input name="form1" type="hidden" value="form1" /> ... markup with panelgroup surrounding <ui:debug> tag:_ <!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"><head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /> <title>ICEfaces Ajax</title><script src="/debugtag/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development" type="text/javascript"></script><script src="/debugtag/javax.faces.resource/bridge.js.jsf?a2949976" type="text/javascript"></script></head><body><span id="debugId"><script language="javascript" type="text/javascript"> //<![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) == 'P' & e.shiftKey & e.ctrlKey) faceletsDebug('/debugtag/icefaces.jsf?facelets.ui.DebugOutput=1273871183676'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); } ; //]]> </script> </span> <form action="/debugtag/icefaces.jsf" enctype="application/x-www-form-urlencoded" id="form1" method="post" name="form1"> <input name="form1" type="hidden" value="form1" />
          Hide
          Judy Guglielmin added a comment -

          without any debug tag (with or without panelGroup> :-

          <html xmlns="http://www.w3.org/1999/xhtml"><head>
          <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
          <title>ICEfaces Ajax</title><script src="/debugtag/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development" type="text/javascript"></script><script src="/debugtag/javax.faces.resource/bridge.js.jsf?a1768851" type="text/javascript"></script></head><body>

          <form action="/debugtag/icefaces.jsf" enctype="application/x-www-form-urlencoded" id="form1" method="post" name="form1">
          <input name="form1" type="hidden" value="form1" />

          Show
          Judy Guglielmin added a comment - without any debug tag (with or without panelGroup> :- <html xmlns="http://www.w3.org/1999/xhtml"><head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" /> <title>ICEfaces Ajax</title><script src="/debugtag/javax.faces.resource/jsf.js.jsf?ln=javax.faces&stage=Development" type="text/javascript"></script><script src="/debugtag/javax.faces.resource/bridge.js.jsf?a1768851" type="text/javascript"></script></head><body> <form action="/debugtag/icefaces.jsf" enctype="application/x-www-form-urlencoded" id="form1" method="post" name="form1"> <input name="form1" type="hidden" value="form1" />
          Hide
          Judy Guglielmin added a comment -

          Based on this, the following markup is required to be surrounded by a span:-

          <span id="xxx"><script language="javascript" type="text/javascript">
          //<![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) == 'P' & e.shiftKey & e.ctrlKey) faceletsDebug('/debugtag/icefaces.jsf?facelets.ui.DebugOutput=1273871183676'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); }

          ;
          //]]>
          </script>
          </span>

          Show
          Judy Guglielmin added a comment - Based on this, the following markup is required to be surrounded by a span:- <span id="xxx"><script language="javascript" type="text/javascript"> //<![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) == 'P' & e.shiftKey & e.ctrlKey) faceletsDebug('/debugtag/icefaces.jsf?facelets.ui.DebugOutput=1273871183676'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); } ; //]]> </script> </span>
          Hide
          Judy Guglielmin added a comment -

          component tree with panelGroup around debug tag:-
          <HtmlPanelGroup id="_t6" inView="true" rendered="true" transient="false">

          <UIDebug hotkey="P" id="j_idt7" inView="true" rendered="true" transient="true"/>

          </HtmlPanelGroup>

          will have to manipulate the tree in PreRenderViewEvent using SystemEventListener in order to remove debug tag, insert panelGroup tag and then re-inserting debug tag. (make all transient).

          Show
          Judy Guglielmin added a comment - component tree with panelGroup around debug tag:- <HtmlPanelGroup id="_t6" inView="true" rendered="true" transient="false"> <UIDebug hotkey="P" id="j_idt7" inView="true" rendered="true" transient="true"/> </HtmlPanelGroup> will have to manipulate the tree in PreRenderViewEvent using SystemEventListener in order to remove debug tag, insert panelGroup tag and then re-inserting debug tag. (make all transient).
          Hide
          Judy Guglielmin added a comment -

          resolved with DebugTagListener class.

          Show
          Judy Guglielmin added a comment - resolved with DebugTagListener class.

            People

            • Assignee:
              Judy Guglielmin
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: