- You need an id for your form.
- You then need to modify the reference to
msg
in the ajax update attribute.
So the following code change should do it for you.
1.<h:form id="formID" >
2.<p:ajax event="change" process="@this" listener="#{exerciseBean.validateInput(exercise.getId())}" update=":formID:msg"/>