block the whole page blockui

UI Components for JSF
Post Reply
pilu82
Posts: 6
Joined: 27 Sep 2016, 13:29

27 Sep 2016, 13:50

hello,

Im desesperatly trying to block the whole page,

Ive tried

Code: Select all

<p:blockUI block=":body" trigger="btn_alta">
and:

(just trying to prove that it works!

Code: Select all

<p:commandButton value="Block this page!" update="@none"   
                 onclick="PF('blockUIWidget').block()"/>

Code: Select all

<pe:blockUI widgetVar="blockUIWidget">  
    <h:panelGrid columns="2">  
        <h:graphicImage value="/resources/img/loading_comments.gif" 
                        style="margin-right: 12px; vertical-align: middle;"/>  
        <h:outputText value="Please wait..." style="white-space: nowrap;"/>  
    </h:panelGrid>  
</pe:blockUI>

Im using

<primefaces.version>6.0.RC4</primefaces.version>
<jsf.version>2.2.4</jsf.version>

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

28 Sep 2016, 10:43

Use a simple div tag which covers height and width 100% with a very high z-index and whatever content inside it to make obvious work is being done. Its default state is display:none.
Use the ajaxStatus component with the appropriate facets to switch the status from display:none to display:block and vice versa.

Rather than creating several posts, with additional information or corrections in each one use the Edit function.
Spamming new threads will irritate the forum Gods.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

pilu82
Posts: 6
Joined: 27 Sep 2016, 13:29

30 Sep 2016, 09:39

andyba wrote:Use a simple div tag which covers height and width 100% with a very high z-index and whatever content inside it to make obvious work is being done. Its default state is display:none.
Use the ajaxStatus component with the appropriate facets to switch the status from display:none to display:block and vice versa.

Rather than creating several posts, with additional information or corrections in each one use the Edit function.
Spamming new threads will irritate the forum Gods.

Thank u very much for your answer. I finally got it. But now i have another problem, the ajax events dont work since i blocked the page. Really they only work only once...

Im a little bit desesperate.

Sorry for my duplicate answer, The first one i sent didnt have my primefaces a JSF version

Thanks in advice!!!


<primefaces.version>6.0.RC4</primefaces.version>
<jsf.version>2.2.4</jsf.version>

pilu82
Posts: 6
Joined: 27 Sep 2016, 13:29

03 Oct 2016, 14:00

Code: Select all

<h:form id="formMenu">
      <ul class="menu">
         <li><p:commandLink action="alta" value="Alta" id="btn_alta"/></li>   
         <li><p:commandLink  value="Tramitaci&oacute;n" id="btn_tramitacion"/></li>   
         <li><p:commandLink  value="Bajas" id="btn_baja"/></li>   
         <li><p:commandLink    action="salir" value="Salir" id="btn_salir"/></li>         
      </ul>
      
      <pe:blockUI block=":full_page" trigger="btn_alta,btn_salir,btn_tramitacion,btn_baja">
         <h:panelGrid columns="1">  
           <h:graphicImage value="/resources/img/ajaxloadingbar.gif" 
                           style="horizontal-align:middle; vertical-align: middle;"/>  
           <h:outputText value="Cargando..." style="white-space: nowrap;"/>  
          </h:panelGrid>
      </pe:blockUI>
   </h:form>
full_page is the id of the body- Now i hace anothers problems but this is the solution

User avatar
andyba
Expert Member
Posts: 2473
Joined: 31 Mar 2011, 16:27
Location: Steinfeld, near Bremen/Osnabrück, DE
Contact:

05 Oct 2016, 11:49

I didn't make myself clear enough: don't use blockUI for this.
PF 4.x (Elite versions), PF 5, Pf 5.1, PF 6.0
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 45 guests