ajaxStatus global use issue/clarificaiton

UI Components for JSF
Post Reply
mosgjig
Posts: 35
Joined: 30 Aug 2010, 19:01

16 Nov 2010, 16:45

I modified the ajaxStatus example given in the showcase to suit my needs however the global notification doesn't seem to work as I had expected.

Using p:layout, i have 3 panes declared in my template (top, left, center). My app workbench implements this template and defines the necessary sections:

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/WEB-INF/layouts/base-layout.xhtml">

    <ui:define name="top">
        <ui:include src="/WEB-INF/header.xhtml"/>
    </ui:define>
    <ui:define name="menu">
        <p:ajaxStatus style="position: relative;float: right; top: 5px; margin-right: 20px;">
            <f:facet name="start">
                <h:graphicImage name="ajax-loader.gif" library="images" />
            </f:facet>
            <f:facet name="complete">
                <h:outputText value=""/>
            </f:facet>
        </p:ajaxStatus>
        <ui:include src="/WEB-INF/mainMenu.xhtml"/>
    </ui:define>
    <ui:define name="left">
        <h:form id="leftPane" prependId="false">
            <h:head/>
            <ui:include src="#{navBean.leftPaneUrl}"/>
            <p:remoteCommand name="updateCenter" process="@none" update="centerPane" />
        </h:form>
    </ui:define>
    <ui:define name="center">
        <h:form id="centerPane" prependId="false">
            <h:head/>
            <ui:include src="#{navBean.centerPaneUrl}"/>
            <p:remoteCommand name="updateCenter" process="@none" update="centerPane" />
        </h:form>
    </ui:define>
</ui:composition>
The only place where ajaxStatus works properly is if i included within the form:centerPane. As listed, it only works on first ajax request, any subsequent requests from leftPane or centerPane actions does not initiate ajaxStatus.

How can i get this to work, as i wish to place the ajaxStatus on my mainMen wich is located in different ui:define from where the action takes place?

I've tried the programatic way as in the showcase, but unable to find a component that will create only a div and contain a widgetVar with show() and hide() methods.

Thanks
pf 3.4
JSF 2.0 (Mojarra 2.1.6)
Tomcat 7

mosgjig
Posts: 35
Joined: 30 Aug 2010, 19:01

21 Sep 2011, 20:11

Has anybody come across this issue?? p:ajax status not working after first fire outside of layout center pane form.
pf 3.4
JSF 2.0 (Mojarra 2.1.6)
Tomcat 7

mosgjig
Posts: 35
Joined: 30 Aug 2010, 19:01

21 Sep 2011, 20:39

After removing <h:head/> from center pane form the ajaxStatus was being initiated however now the rerendered fragment will not load component specific resources when needed. How can i get around this catch 22
pf 3.4
JSF 2.0 (Mojarra 2.1.6)
Tomcat 7

mosgjig
Posts: 35
Joined: 30 Aug 2010, 19:01

24 Oct 2011, 14:55

The following new feature http://blog.primefaces.org/?p=1503 may resolve this issue.
pf 3.4
JSF 2.0 (Mojarra 2.1.6)
Tomcat 7

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests