Archive

Archive for the ‘Richfaces’ Category

Richfaces, IE-”runtime error” and nested forms

15/06/2010 1 comment

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.

Categories: javascript, JSF, Richfaces Tags: , , , ,

Issue in localisation of hibernate validator annotations via Richfaces

14/01/2010 Leave a comment

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’

Remembering the sortOrder of a rich:dataTable

17/12/2009 Leave a comment

A plain and simple solution to remember the sortOrder of a rich:dataTable can be found
in the Richfaces forum.

Categories: java, JSF, Richfaces Tags: , ,
Follow

Get every new post delivered to your Inbox.