My registrationBean (extends AbstractViewController) has a "password" attribute as well as a save() method which has this code:
if (passwords_dont_match) { error(messages.getMessage("password.mismatch")); etc. } My jsp has this code: <h:message for="password" /> in the "<td>" right next to where the password field is. However the error doesn't show up. (There is an empty <td> in the source so I think the problem is not in my panelGrid..) Plus if I know the errors are being caught since <f:facet name="header"><h:messages globalOnly= "true" /></f:facet> does show the error. I looked at the docs and saw that maybe I should use the other error method in org.apache.shale.view.AbstractViewBean: protected void error(javax.faces.component.UIComponent component, java.lang.String summary) But I am not sure how I should get the UIComponent object to use. I tried unsuccessfully to use: error( FacesContext.getCurrentInstance().getViewRoot().findComponent("password"), messages.getMessage("password.mismatch")); but the above component is null, sadly.. I would have thought that being in the RegistartionBean would imply getting any UIComponent in registration.jsp should be easy..? Is this the right approach? (Or I should just go home...) Geeta