I tried to call javascript function in my xhtml page by using RequestContext but I could not succeed it. Is there a way to call javascript function from view bean at prime faces ?
If the questions is not clear then I can provide code.
I tried to call javascript function in my xhtml page by using RequestContext but I could not succeed it. Is there a way to call javascript function from view bean at prime faces ?
If the questions is not clear then I can provide code.
Like @Parkash Kumar said, you can call it from the bean, like this:
RequestContext.getCurrentInstance().execute("alert('script called.')");
or directly from the xhtml:
<p:commandButton value="Save" actionListener="#{requestContextView.save}" oncomplete="handleComplete(xhr, status, args)" />