ajax - Loading data after a JSF page has completed rendering -


i'm using richfaces 4 , mojarra 2.0.4. i'll glad if answer specific richfaces 4 framework :)

i understand jsf components processed @ server side. of pages data centric. when load page (eg: inside richtab switchtype ajax), takes lot of time bean execute method marked @postconstruct execute , fetch data. , hence time period between user clicking on tab's header , actual page rendering quite large, bad user experience. i've implemented lazy loading datatables in page still doesn't optimize page load time since @postconstruct still there.

is there anyway can load page first , fetch data ajax , update page? loading time annoying user.any appreciated :)

ps: thought of using oncomplete , onbeforedomupdate client side events of rich:tab , call ajax functions declared a4j:function. seems these events fired before page switched.

use onload event of <body> tag in html along <a4j:jsfunction>

if still feel page not rendering before method called use settimeout('a4jfunctionname',10) javascript function in onload complete rendering first.


Comments