4.0 SNAPSHOT: blockUI requires jQuery v1.2.3 or later!

Community Driven Extensions Project
Post Reply
tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

11 Sep 2013, 09:01

There is also another problem with sonatypes pom inheritance.
Hopefully Oleg can check this.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

11 Sep 2013, 09:55

I hope PF 4.0 RC1 will be available this week. We will release Extensions 1.0 RC1 this week too then und I will try to look deeper into this problem with the sonatype repo.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

11 Sep 2013, 10:07

As you can see Oleg, there is a snapshot from yesterday available - so our jenkins task should work perfectly if the pom inheritance stuff from sonatype is fixed.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

11 Sep 2013, 10:34

But this is a strange thing. "The pom inheritance stuff" is fine on local machine. There is a pom in the sonatype we reference in our master-pom. I can not see any changes on sonatype's side. Look, it is available http://repo1.maven.org/maven2/org/sonat ... rent-7.pom
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

12 Sep 2013, 20:03

UPDATE:

I am no longer waiting for PrimeFaces Extensions 1.0 snapshot.

With 4.0 snapshot "JAR" out there in the repository, I decided to download and want to start using PrimeFaces 4.0 snapshot...today/yesterday/now (or however you prefer to say it, smile).

So, of course, I had to 'ditch' (or 'get rid of') pe:blockUI, and replace it with p:blockUI. So far, p:blockUI is working okay with pe:layout, but I need to get rid of my nested layouts and hopefully, replace with PrimeFaces 4.0 snapshot new feature...sticky panels. hopefully, that will allow me to avoid using (north/center) layout panes, but I do have an 'east' pane which is rarely/never used by endusers, and it is rendered via button click (show/hide).

p:blockUI only blocks center or center-center (PrimeFaces Extensions) layout pane. Why? i will let you tell me...after I share what I'm doing below.

of course, there is my p:blockUI; take note of block="..."

Code: Select all

<p:blockUI block=":pageContentPanel" widgetVar="bui"/>
my index.xhtml (parent to all xhtml pages, except login and session expired xhtml pages); take note to 'pageContentPanel', which is inside of the 'center' layout pane.

Code: Select all

<?xml version='1.0' encoding='UTF-8' ?>
<!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"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:o="http://omnifaces.org/ui"
      xmlns:of="http://omnifaces.org/functions">

    <f:view renderKitId="HTML_BASIC">
        <f:metadata>
            <o:enableRestorableView/>
            <f:event type="javax.faces.event.PreRenderViewEvent" listener="#{pageNavigationController.preRenderView()}"/>
        </f:metadata>

        <h:head>
            <ui:include src="#{pageNavigationController.gmapsAutoComplete ? '/head_gmapsAutoComplete.xhtml' : (pageNavigationController.gmaps ? '/head_gmaps.xhtml' : '/head_default.xhtml')}"/>
        </h:head>

        <h:body>

            <pe:layout id="fullPageLayout" options="#{layoutController.layoutOptions}"
                       widgetVar="layoutWidget">
                <pe:layoutPane position="north">
                    <ui:include src="#{pageNavigationController.pageMenu}"/>
                </pe:layoutPane>

                <pe:layoutPane position="center">

                    <p:outputPanel id="pageContentPanel"
                                   styleClass="#{layoutController.isPageWithLayoutPane(pageNavigationController.page) ? 'ui-layout-content' : null}"
                                   style="width: 100%; height: 100%; overflow: auto;">

                        <ui:include src="#{pageNavigationController.page}"/>

                    </p:outputPanel>


                    <h:outputScript library="primefaces" name="push/push.js" target="head" />
                    <p:growl id="pushedNotifications" for="socketForNotifications"
                             widgetVar="growl" globalOnly="false"
                             life="30000" showDetail="true" showSummary="true" escape="false"/>
                    <p:socket id="socketForNotifications" onMessage="handlePushedMessage"
                              widgetVar="socket"
                              channel="/#{pf_usersController.userPushChannelId}" />

                </pe:layoutPane>
            </pe:layout>

        </h:body>

    </f:view>

</html>
i'm about to do some changes to my app...so I can be on board with PrimeFaces 4.0 snapshot, once and for all...and FINALLY! :)
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

rikup
Posts: 459
Joined: 29 Jan 2013, 14:27

13 Sep 2013, 22:14

UPDATE: I'm still waiting for Extensions 1.0 Snapshot, I rely so heavily on dataExporter, timeLine, inputMask and specially blockUI :) Keep on doing your great work! :)

@Howard: Have you tested p:blockUI and p:fileUpload, do they work if they are used in same page?
PrimeNG 2.0.0
Angular 2.4.5

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

13 Sep 2013, 22:36

rikup wrote:UPDATE: I'm still waiting for Extensions 1.0 Snapshot, I rely so heavily on dataExporter, timeLine, inputMask and specially blockUI :)
Well, I am using the first release of PrimeFaces Extensions 1.0 snapshot, which was released July 20 or July 23. Do you remember when Oleg mentioned that? I downloaded that JAR, and remember, I tested it against PrimeFaces Elite 3.5.9, and it did not work, because the JAR targets PrimeFaces 4.0 (snapshot).

So, on my development server, I still had that JAR added to my web app's project in NetBeans, so yesterday, when I migrated to PrimeFaces 4.0 snapshot, everything 'just worked'. Why? maybe because I had that first/only release of PrimeFaces Extensions 1.0 snapshot. :)
rikup wrote:@Howard: Have you tested p:blockUI and p:fileUpload, do they work if they are used in same page?
Per your request, I just tested the 'simple' p:fileUpload in my app, and p:blockUI works as expected...with p:fileUpload. I'm actually liking p:blockUI, but when PrimeFaces Extensions 1.0 (RC) is released, then i'm sure I will simply-and-easily replace p:blockUI with pe:blockUI.

I have the following in my app (p:fileUpload), as you can see that my onclick="..." calls my javascript method which calls blockUI.

Code: Select all

<h:form id="fileUploadForm" enctype="multipart/form-data">
    <p:panel header="Upload attachment">
        <p:fileUpload value="#{pf_ordersController.uploadedFile}" mode="simple" />
        <p:commandLink value="Upload File" ajax="false" onclick="displayLoadingImage(true)"
                       actionListener="#{pf_ordersController.uploadAttachment()}"/>
    </p:panel>
</h:form>
and in my javascript file, which I modified yesterday, in preparation for migrating back-and-forth between p:blockUI and pe:blockUI, i have the following method, which is called by the fileUpload commandLink (above)

Code: Select all

function displayLoadingImage(value) {
    if (value) {
        // p:blockUI
        PF('bui').show();
        // pe:blockUI
        //PF('bui').block();
    }
    else {
        // p:blockUI
        PF('bui').hide();
        // pe:blockUI
        //PF('bui').unblock();
    }
}
again, i repeat, I'm liking p:blockUI, because pe:blockUI had an issue, where pe:blockUI javascript methods would NOT allow you to use a 'loading image' for non-AJAX requests. remember, i have plenty of non-AJAX requests, and for a while, pe:blockUI was 'designed' for AJAX (requests). So, when i use pe:blockUI javascript methods to block UI before a non-AJAX request, I have to be satisfied with the 'Please wait...' default message of pe:blockUI (smile), and I have been satisfied with that, but there is nothing like adding some type of loading image, too (which did not work with pe:blockUI...for non-AJAX requests). I think Oleg fixed that recently, and that fix may be targeting PrimeFaces Extensions 1.0 (snapshot/RC). hopefully, RC (release candidate) will be ready, soon. :)

also, i will tell you...i think it looks quite 'tacky' that p:blockUI only blocks 'center' or 'center-center' layout panes. entire 'targeted' layout pane is not blocked, when targeted 'panel' has nested layoutPanes (north and center-center); only center-center is blocked, when I have center-north and center-center layout panes. :( :( :(
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

14 Sep 2013, 15:20

again, i repeat, I'm liking p:blockUI, because pe:blockUI had an issue, where pe:blockUI javascript methods would NOT allow you to use a 'loading image' for non-AJAX requests. remember, i have plenty of non-AJAX requests, and for a while, pe:blockUI was 'designed' for AJAX (requests). So, when i use pe:blockUI javascript methods to block UI before a non-AJAX request, I have to be satisfied with the 'Please wait...' default message of pe:blockUI (smile), and I have been satisfied with that, but there is nothing like adding some type of loading image, too (which did not work with pe:blockUI...for non-AJAX requests).
pe:blockUI and p:blockUI use the same client-side API from PrimeFaces core. At least in upcoming releases. These both components only listen to AJAX requests. Full-page requests can not be blocked by this component unless you use Post/Redirect/Get (PRG) pattern. For pull-page requests use other techniques (if they really need to be blocked). I would probably not block full-page requests or simple show a "loading" PF dialog in onclick.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

14 Sep 2013, 15:36

Thanks Oleg.

Since PrimeFaces 4.0 RC1 is available in PrimeFaces repository, will it be possible to release PrimeFaces Extensions 1.0 RC1, or has that already been released as PrimeFaces Extensions 1.0 snapshot (2013-07-20)?

that's the version that i'm using for now until that repository is updated with later/latest version of PrimeFaces Extensions 1.0 snapshot.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

14 Sep 2013, 17:27

We will release a Extensions RC when 4.0.RC1 is released.
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest