Richfaces, IE-“runtime error” and nested forms

When developing a webapp with Richfaces, you will sometimes encounter a javascript “runtime error”. This error will only occur in MS Internet Explorer (seen at version 6/7).

I struggled and but then i found the reason and the solution. In Richfaces 3.3.2 CR1 there is some JS code in form.js, which tries to get all elements from the surrounding form. Like this

//..
var field = form.elements[fields[i]]
//..

This seems to fail only in Internet Explorer.
But why? I don’t know for sure, but it only occurs when you nest forms. Nesting of forms is invalid HTML, so it is not a bug in Richfaces. Check your UI structure instead.

<!--Not valid / never do this-->
<h:form>
  <h:form>
   <!--stuff-->
  </h:form>
</h:form>

Remember: NEVER ever nest forms into form.

Issue in localisation of hibernate validator annotations via Richfaces

There is an issue when you want to localise your ‘hibernate validator annotation’ messages in combination with Richfaces (f.e. using <rich:graphValidator>).

See https://jira.jboss.org/jira/browse/RF-8265

Summary:
Use ‘ValidatorMessages.properties’ instead of ‘ValidationMessages.properties’