Java onChange Archived method call


I am trying to call my method from the Archived checkbox of axelor. When I put a button my call works on the onClick. But it doesn’t work on axelor’s onChange checkbox. How can I do ?

My example for the button that works, and my example for the checkbox that doesn’t. :

 <field name="archived" title="Archiver" onChange="action-contract-method-archiverRec"/> 
      <button onClick="action-contract-method-archiverRec" name="archiver" title="Archiver" colSpan="2"/>

Yet as you can see both calls the same method…

Please see how I did it for a checkbox in Timeshee Form

1 J'aime

Thanks Fabiobottan it’s good.

1 J'aime