Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute method after page has been loaded [duplicate]

Tags:

jsf

I want to call an JSF Action after the website has been fully loaded?

it tried something like

<h:body onload="#{service.getMessage()}">

but in this case the method is executed before the page is visible to the user

Any ideas?

like image 474
flo8433 Avatar asked Feb 06 '26 05:02

flo8433


1 Answers

JSF is server side, onload is client side. Your only option would be to have the onload fire off an ajax request. See this post for an example.

like image 146
Lucas Avatar answered Feb 09 '26 08:02

Lucas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!