Document and add an example for setAction()