I want to make a refactoring
in my code, and for this I need to get the id of a component that has undergone an action.
My target would be that I have two datatables
, and wanted to get id
from them and from id
define what action to take.
So I have the datatables
as shown below
Ihavethefollowingajaxcallswithineachtable.
<p:ajaxevent="rowEditInit" onstart="disableBtnCorrenteExcluir();"/>
<p:ajax event="rowEdit" oncomplete="if (args.validationFailed) disableBtnCorrenteExcluir(); else enableBtnCorrenteExcluir();"/>
<p:ajax event="rowEditCancel" oncomplete="enableBtnCorrenteExcluir();" />
For each table I run methods to block the Add Track, Edit Effect, and Delete Effect buttons. What is in question is, if when I execute the above methods on the specific events of Primefaces
, will it be able to get which object called it?
How can I do this?