Hi all,
Is there a primefaces loading component, that temprarily displays whiles an ajax request is being made and hides after the request completes or is it possible to simulate such an effect using any of the current components?
Primefaces Loading Component
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Glad to help.
Hi,
I need to load 100 charts and loading each chart takes different times.
is there any way of showing a loading Gif per chart while loading them?
After loading of a chart is completed, its loading Gif will disappear.
is it possible to do it with an easy way.
I need to load 100 charts and loading each chart takes different times.
is there any way of showing a loading Gif per chart while loading them?
After loading of a chart is completed, its loading Gif will disappear.
is it possible to do it with an easy way.
Ramazan YILDIZ
Senior Software Developer Engineer
Netas RnD
ramazangsu[at]gmail.com
Senior Software Developer Engineer
Netas RnD
ramazangsu[at]gmail.com
By the way charts are dynamic primefaces linecharts (jqplot).
-- thanks in advance.
-- thanks in advance.
Ramazan YILDIZ
Senior Software Developer Engineer
Netas RnD
ramazangsu[at]gmail.com
Senior Software Developer Engineer
Netas RnD
ramazangsu[at]gmail.com
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
I was going to post something about thinking for others however I refrained.
AJAX Status does not count when loading a page, it only works when an AJAX request is in progress so they don't work as page loading indicators.
However, you do have an indicator for each chart, the chart itself.
Other than that you can also do clever stuff with JavaScript that sets up a model dialog box in which an animations runs and javascript called after each graph tag which changes the animation accordingly.
AJAX Status does not count when loading a page, it only works when an AJAX request is in progress so they don't work as page loading indicators.
However, you do have an indicator for each chart, the chart itself.
Other than that you can also do clever stuff with JavaScript that sets up a model dialog box in which an animations runs and javascript called after each graph tag which changes the animation accordingly.
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
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Thanks for replying andyba,
I think that an ajaxStatus like indicator working for loading of components(chart etc) would be worthy and appreciated.
With Javascript it is not easy to manage dynamic loading charts.
Would you please offer a pseudo code to me, if it is possible.
I am trying to load a dashboard page including a lot of charts each one to be rendered separately from each other and each one should have
it's own loading indicator. in backing bean side it seems i need to use concurrent threads retrieving data from Database as well which is another tricky part to me...
regards.
I think that an ajaxStatus like indicator working for loading of components(chart etc) would be worthy and appreciated.
With Javascript it is not easy to manage dynamic loading charts.
Would you please offer a pseudo code to me, if it is possible.
I am trying to load a dashboard page including a lot of charts each one to be rendered separately from each other and each one should have
it's own loading indicator. in backing bean side it seems i need to use concurrent threads retrieving data from Database as well which is another tricky part to me...
regards.
Ramazan YILDIZ
Senior Software Developer Engineer
Netas RnD
ramazangsu[at]gmail.com
Senior Software Developer Engineer
Netas RnD
ramazangsu[at]gmail.com
- andyba
- Expert Member
- Posts: 2473
- Joined: 31 Mar 2011, 16:27
- Location: Steinfeld, near Bremen/Osnabrück, DE
- Contact:
Without knowing exactly how you want to do things any psuedocode I provide won't really help you.ryildiz wrote:Thanks for replying andyba,
I think that an ajaxStatus like indicator working for loading of components(chart etc) would be worthy and appreciated.
With Javascript it is not easy to manage dynamic loading charts.
Would you please offer a pseudo code to me, if it is possible.
I am trying to load a dashboard page including a lot of charts each one to be rendered separately from each other and each one should have
it's own loading indicator. in backing bean side it seems i need to use concurrent threads retrieving data from Database as well which is another tricky part to me...
regards.
I would certainly reconsider loading so many charts at once though, split them up into tabs where the tabs are dynamically loaded.
You could try having an image which overlays each chart component which you simply rendered="false" via RequestContext.update in each chart data accessor.
You are not going to gain anything by use concurrency here unless you attempt to prepare each chart model at the beginning of the request: this will almost certainly kill your server when you have more than a few concurrent requests.
There are several things that need to be considered or reconsidered.
1- You have ~100 charts that need to be displayed in a dashboard. Don't even attempt to load them into one page, use a Tab or Accordion and load each view dynamically
2- Your chart models are taking a long time to initialise. Optimise the initialisation (run aggregation at discrete invervals via a @TimerService and use this data to initialise your charts as an example)
3- You can setup a status for each chart and create a widgetVar reference which you can manipulate via RequestContext.
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
Glassfish 4.1, Mojarra 2.x, Java 8, Payara 4.1.1.
If you haven't read the forum rules read them now
Thanks a lot for your suggestion andyba.
i'll try to do so.
i'll try to do so.
Ramazan YILDIZ
Senior Software Developer Engineer
Netas RnD
ramazangsu[at]gmail.com
Senior Software Developer Engineer
Netas RnD
ramazangsu[at]gmail.com
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests