Reputation: 1802
I am wondering how should I call a bean method after page loading. I tried something like this but it did not actually work:
<p:remoteCommand name="autoRun"
action="#{enbBean.getFakeEndListForTesting()}"
autoRun="true" update="enbTable"/>
Upvotes: 0
Views: 2323
Reputation: 570
below link visit. as far as i know xhtml page loading event run !!!
When to use f:viewAction / preRenderView versus PostConstruct?
Upvotes: 0
Reputation: 24433
Strange, that should work. Any exceptions? This post contains some alternative ways of achieving what you need. The most standard way should be the first suggestion, to use
<h:body>
<f:ajax event="load" listener="#{bean.onload}" />
</h:body>
with this
public void onload(AjaxBehaviourEvent event) {
// ...
}
Upvotes: 1