Support set ok and cancel handler through args

Support set ok and cancel handler through args