Execute p:commandLink action before onclick event?

后端 未结 1 1398
一向
一向 2021-01-14 03:49

I have a p:commandLink which launches a dialog on click. Further there is an action, which must be executed before launching the dialog, as the dialog

相关标签:
1条回答
  • 2021-01-14 04:35

    With the oncomplete attribute and the ajax update attribute.

    <p:commandLink action="#{service.computePrefetch(_var)}" update="dlgId" oncomplete="dlg.show()"/>
    

    Execution order:

    onclick->action->update->oncomplete

    BalusC posted a detailed sequence Execution order of events when pressing PrimeFaces p:commandButton

    0 讨论(0)
提交回复
热议问题