Page 3 of 4

Re: Component for Network Speedtest

Posted: 03 Nov 2017, 08:46
by stefan.sibitz
Ok, no problem.

The only "thing" that i don't know is how to build up
Primefaces and Primefaces-Extensions-Library with maven in the right way - for using it as library in my project.

I will get a lot of javascript errors (primefaces-version is a nullpointer-string, so the libraries will not be loaded correct)
in the debugger so my project will not work anymore...

I also tried to build it with the Release switch locally, but i am getting an error on build cause of wrong password ?!

Do i need some "Switches" to make Primefaces build work on a Wildfly-Server because at the moment with only building it
via

Code: Select all

maven clean install 
does not build me a right Primefaces 6.2 SNAPSHOT ...

The showcase is currently working with Jetty, but on Wildfly it's not working...

Re: Component for Network Speedtest

Posted: 03 Nov 2017, 13:37
by Melloware
Hmm all you should have to do is "mvn clean install" to build the JAR for both PF and PFE.

I have never gotten the showcase to work on anything else other than "mvn clean jetty:run".

A few more notes from your component:

1. Add style and styleClass attributes to the outermost DIV. That would give users the ability to style the whole component.

Code: Select all

writer.startElement("div", github);
        writer.writeAttribute("id", clientId, "id");
        String styleClass = "ui-g " +  StringUtils.defaultString(st.getStyleClass());
        writer.writeAttribute("class", styleClass , "styleClass");
        if (st.getStyle() != null) {
            writer.writeAttribute("style", st.getStyle(), "style");
        }
2. Don't include the 5MB dummy file to use in Speedtest. This will bloat the JAR from 2MB to 7MB. I would instead recommend adding a required file="" attribute on the component and make the end user put in a file there.

Re: Component for Network Speedtest

Posted: 06 Nov 2017, 09:40
by stefan.sibitz
Hello,

1.) Ok, i will add the style-class as you wrote on your example.
But keep in mind that the speedtest itselfs is a SVG-Graphic which can't be easily styled with css-styles
cause of generation with javascript-libraries...

2.) Cause of the 5MB-Test file will be needed for testing the download speed -
Is it possible to generate it "on the fly" for let the user download it in the extension-showcase ?
(Primefaces Download Component...)
Then i will also fork the primefaces extension showcase and there i already have a controller
for handling the speedtest's ...

But i said it one more again:
First of all i have to solve the Issues coming with Primefaces 6.2 SNAPSHOT
because my project is no longer working against the current version of primefaces 6.2 ...
Ajax does not react and raises exceptions, script's are not found anymore, primefaces has no version number and so on...

Here i have to analyze first because when it currently comes to a release
i can't use anything of the Primefaces-Framework/Extensions and the only difference at the moment
is the using of an old Jetty-Server in the Example of Primefaces and not JBoss Application Server as i am using...

Re: Component for Network Speedtest

Posted: 07 Nov 2017, 13:53
by Melloware
My thought was if you make it a file="" property of the component then we can include your 5 MB test file in the Showcase WAR file.

I just don't want to include it inside the library JAR. We can make users pick their own file="" when they are running their speed test. Plus they can pick a bigger or smaller file if they choose.

Re: Component for Network Speedtest

Posted: 07 Nov 2017, 16:04
by stefan.sibitz
Ok, this makes sense.

Should i also make a fork of the primefaces-extensions-showcase
and make a prototype for the showcase for the speedtest component ?

I then can also include the test-file here and
let the user generate another files by implement the generation-method
in the controller-class/managed bean of speedtest...

Re: Component for Network Speedtest

Posted: 07 Nov 2017, 16:29
by Melloware
That would be great if you could so that way I can just incorporate both your component and your showcase example page when you are all done and give me the go ahead.

Re: Component for Network Speedtest

Posted: 08 Nov 2017, 13:34
by stefan.sibitz
I now have done the changes as we wrote about.

The Primefaces-Extensions-TestCase is working in my case with the new SpeedTest Component,
but i am not able to test it in my "real" project because Primefaces 6.2-SNAPSHOT is not working here anymore.
Primefaces 6.2-SNAPSHOT seems to be very unstable at the moment in production environment
on a Wildfly 11 - Server (Full EE profile) ?!
(Primefaces 6.1.8 is correctly working by the way !)

But nevertheless here are a preview of the Speedtest-Component in my repository for checking:

The primefaces-extensions - Fork...
https://github.com/ssibitz/core

...and now also the primefaces-extensions-showcase - Fork:
https://github.com/ssibitz/showcase


Greetings

Re: Component for Network Speedtest

Posted: 08 Nov 2017, 14:01
by Melloware
Awesome let me work on incorporating your component!

Re: Component for Network Speedtest

Posted: 08 Nov 2017, 15:09
by stefan.sibitz
It seems that in Primefaces 6.2-SNAPSHOT the as deprecated declared functions...

Code: Select all

RequestContext context = RequestContext.getCurrentInstance();
context.update("form:panel");
context.execute("PrimeFaces.info('Hello from the Backing Bean');");
... are only raising an exception. That's the reason why my real app does not work with primefaces 6.2 !
as i replaced it as described in the deprecated comment:
@deprecated Use PrimeFaces.ajax().update() instead

So it now also work's in my real application as well with the component and no exceptions :-)

What do you need for incorporating ?

Re: Component for Network Speedtest

Posted: 08 Nov 2017, 15:11
by tandraschko
Does it really throw an exception? Could you post the stacktrace please?
Its just deprecated but it should still work.