You can observe model.categoryId in the composer controller and run you code when the change occurs.
model.categoryId