Navigation Menu

UI Components for JSF
Post Reply
draco
Posts: 18
Joined: 20 Sep 2010, 17:24

21 Sep 2010, 13:34

Hi,

I am hoping someone on this forum can help me sort out a problem I've been having.
Let me just say, I am completely new to both JSF and Primefaces (I've been stuck in the world of Struts 1.1 for four agonizing years...).
When I saw the Primefaces showcase and how simple it was to use and setup I thought I just had to give it a go (especially with all the JSF 2.0 support).

Anyway here's my question. I am trying to create an admin-console similar to the glassfish v3 console. The difference is, I am using an Accordion and Menu/MenuItem components.

----------------------------------------
Menu DIV |----- Content Div --------------|
----------------------------------------

What I have done is make the MenuItems do a PPR on the Content Div. But the content being rendered seems to be missing essential parts (e.g. the class attribute).
If I make the exact same request, but make a full page reload rather than an ajax post, the content rendered in the content div is correct.

Example, the content includes a <p:commandButton> in the PPR the button has not been skinned and is missing the class attribute

PPR request:

Code: Select all

<button id="j_idt10:j_idt63:j_idt66" name="j_idt10:j_idt63:j_idt66" onclick="PrimeFaces.ajax.AjaxRequest('/admin-console/faces/template.xhtml',{formId:'j_idt10:j_idt63',async:false,global:true,source:'j_idt10:j_idt63:j_idt66',process:'@all',update:'j_idt10:j_idt63:serverConfigPanel'});return false;"
                    type="submit">Submit
            </button>
Full page reload:

Code: Select all

<button type="submit" onclick="PrimeFaces.ajax.AjaxRequest('/admin-console/faces/template.xhtml',{formId:'j_idt10:j_idt63',async:false,global:true,source:'j_idt10:j_idt63:j_idt66',process:'@all',update:'j_idt10:j_idt63:serverConfigPanel'});return false;"
                 name="j_idt10:j_idt63:j_idt66" id="j_idt10:j_idt63:j_idt66"
                 class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button"
                 aria-disabled="false"><span class="ui-button-text">Submit</span></button>
So please tell me what I'm doing wrong?

Thanks

draco
Posts: 18
Joined: 20 Sep 2010, 17:24

21 Sep 2010, 13:50

Nevermind... The content page I was requesting did not include the skin.css file and thus the button was not being rendered properly.
PrimeFaces-3.2, Glasfish 3.1, JSF 2.0, IDEA 11, Mojarra 2.0.3

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 49 guests