Posts tagged ‘datatable’

As you can see title of this entry is not very descriptive but the idea is to save some of you folks couple of hours (this is how I’ve been trying to find some pieces of information).

So the problem is pretty well described under this entry on seam forum but just to give you an idea:

  • you have a list of integer wrappers (List<Integer>)
  • you pass this list to your jsf view
  • some component goes through entries in the list (rich:datatable in my case)
  • all entries are displayed as h:inputText and value is assigned using name given in var attribute
  • each input text has an onblur event attached that re renders the whole element (rich:datatable)

The expected behaviour is that newly entered value is bound and displayed again in the form but this is not happening.

The solution is described here – basically assigning value using name given in var attribute is not bi-directional, so you need to use indexing technique.