I have the following link in one of my JSPs. When an user clicks on that link I'm calling an action in my backing bean. I need to show a JavaScript alert message based on the response of that action.
<h:commandLink onclick="setSelectedClientAndFund();" id="next"
action="#{fyeSelection.getFYEReportHome}">
<h:graphicImage value="../images/NextBT.png"></h:graphicImage>
<a4j:loadScript src="alert('hello');"></a4j:loadScript>
</h:commandLink>
How can I achieve this?