<ui:debug/> tag not working with Primefaces

UI Components for JSF
Post Reply
User avatar
MISS_DUKE
Posts: 273
Joined: 08 Aug 2010, 05:52

29 Oct 2010, 08:35

I have read documentations that the <ui:debug/>tag gives valuable troubleshooting information upon pressing CTRL-SHIFT-D. But this never works for me. Please anyone tell me what am I missing.

I tried with various hotkeys, still no success. eg:

Code: Select all

<ui:debug hotkey="a"/>
JSF implementation: Mojarra V2.1.7
JSF component library: Primefaces V3.1.1
Server: GlassFish Open Source Edition V3.1.1 (build 12)

User avatar
MISS_DUKE
Posts: 273
Joined: 08 Aug 2010, 05:52

02 Nov 2010, 15:48

I got the following page source (when tested with hotkey as y). The source is having some debugging information, but I never succeeded in getting the pop-up window in FF.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
        <title>Facelet Title</title></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) == 'Y' & e.shiftKey & e.ctrlKey) faceletsDebug('/WebApplication1/faces/index.xhtml?facelets.ui.DebugOutput=1288703396651'); else if (faceletsOrigKeyup) faceletsOrigKeyup(e); };
//]]>
</script></body>
</html>
JSF implementation: Mojarra V2.1.7
JSF component library: Primefaces V3.1.1
Server: GlassFish Open Source Edition V3.1.1 (build 12)

ethermion
Posts: 117
Joined: 25 Aug 2010, 15:11

02 Nov 2010, 15:58

It definitely works if you put it in the right place.
If you are using templates, it needs to be inside a ui:define on the actual page. It does not seem to work if you install it in the template, or randomly in your ui:composition.
Find your first <h:form> and put it on the line above.

All the same, I find it curious, but not especially helpful.

-e
Mojarra 2.2.8
Primefaces 5.1
Wildfly 8.2

User avatar
MISS_DUKE
Posts: 273
Joined: 08 Aug 2010, 05:52

02 Nov 2010, 16:24

But it is not working for me even in a very simple (test) page, page code as follows:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:debug hotkey="y"/>
    </h:body>
</html>
JSF implementation: Mojarra V2.1.7
JSF component library: Primefaces V3.1.1
Server: GlassFish Open Source Edition V3.1.1 (build 12)

ethermion
Posts: 117
Joined: 25 Aug 2010, 15:11

02 Nov 2010, 16:39

try hotkey="1" (the number 1).

I hear that the default (D) does not work because browsers eat that combination. Maybe ctrl-shift-Y gets eaten too. The number 1 works for me in chrome and firefox.
-e
Mojarra 2.2.8
Primefaces 5.1
Wildfly 8.2

User avatar
MISS_DUKE
Posts: 273
Joined: 08 Aug 2010, 05:52

02 Nov 2010, 16:52

It is working for me on Chrome with hotkey as 1. (but not on FF, but it is not an issue)

Earlier I tried with various keys as hotkey, but never got the idea of using a number key as a hotkey.

Thank you very much.
JSF implementation: Mojarra V2.1.7
JSF component library: Primefaces V3.1.1
Server: GlassFish Open Source Edition V3.1.1 (build 12)

ethermion
Posts: 117
Joined: 25 Aug 2010, 15:11

02 Nov 2010, 17:11

Great! Let me know if you find anything of interest in that screen. So far, it has not helped me solve any problems. If I am missing something, I would like to know.

-e
Mojarra 2.2.8
Primefaces 5.1
Wildfly 8.2

User avatar
MISS_DUKE
Posts: 273
Joined: 08 Aug 2010, 05:52

07 Nov 2010, 07:22

The scope variables that you can find on the debug window helped me to troubleshoot some issues.
JSF implementation: Mojarra V2.1.7
JSF component library: Primefaces V3.1.1
Server: GlassFish Open Source Edition V3.1.1 (build 12)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 37 guests