如何在jsf中将actionListener作为参数传递
how to pass a actionListener as parameter in jsf
我在每个页面中都有相同的代码,所以有一种方法可以将 actionListener 作为参数传递?
<p:confirmDialog widgetVar="deleteDialog" showEffect="fade" width="500" message="Deseja apagar o registro selecionado?" header="Confirmar" severity="warn">
<p:commandButton value="Sim" icon="pi pi-check" actionListener="#{cargoController.excluir}" process="@this" update="@form" oncomplete="PF('deleteDialog').hide()"/>
<p:commandButton value="Não" type="button" styleClass="ui-button-danger" icon="pi pi-times" onclick="PF('deleteDialog').hide()" style="margin-left: 30px" />
</p:confirmDialog>
<ui:param name="pageController" value="#{randomController}"/>
对我有用
我在每个页面中都有相同的代码,所以有一种方法可以将 actionListener 作为参数传递?
<p:confirmDialog widgetVar="deleteDialog" showEffect="fade" width="500" message="Deseja apagar o registro selecionado?" header="Confirmar" severity="warn">
<p:commandButton value="Sim" icon="pi pi-check" actionListener="#{cargoController.excluir}" process="@this" update="@form" oncomplete="PF('deleteDialog').hide()"/>
<p:commandButton value="Não" type="button" styleClass="ui-button-danger" icon="pi pi-times" onclick="PF('deleteDialog').hide()" style="margin-left: 30px" />
</p:confirmDialog>
<ui:param name="pageController" value="#{randomController}"/>
对我有用