Fórumok

how to call the bean method first and later javascript function

srinvias p, módosítva 8 év-val korábban

how to call the bean method first and later javascript function

New Member Bejegyzések: 23 Csatlakozás dátuma: 2015.05.13. Legújabb bejegyzések
how to call the bean method first and later javascript function using <alloy:commandLink> component?
thumbnail
Neil Griffin, módosítva 8 év-val korábban

RE: how to call the bean method first and later javascript function

Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
Hi Srinvias,

Do you mean something like the PrimeFaces "oncomplete" attribute with p:commandLink?

If so, then we have an example of how to do something similar with alloy:commandButton (it would be the same for alloy:commandLink) in the Selection Usage page for alloy:dataTable in the Liferay Faces Showcase.

At line 47 of dataTable.xhtml, the f:ajax tag has an "onevent" attribute. This is a standard JSF 2 feature that provides the ability to invoke a JavaScript function at different points of the execution of XmlHttpRequest. Line 55 of dataTable.xhtml shows that by checking for "success" you can execute some JavaScript after the XmlHttpRequest has completed successfully.

Kind Regards,

Neil