I want to invoke an EJB method when I click a link in my JSF website. At the moment I use an h:commandLink
within an h:form
tag to trigger the EJB method:
<h:form>
<h:commandLink value="Logout" action="#{loginBean.logout}"/>
</h:form>
Is there a way to do the same without the need of an h:form
tag?
if you don't want a form (but i don't get why) you can:
<f:event type="preRenderView" listener="#{bean.listener}"/>