I’m trying to output the row index for each row in a rich:dataTable. It looks like the stateVar attribute would do this, but I can’t figure out how to use it.
The reference documentation for this is hopeless:
The attribute provides access to a component state on the client side
Simply outputting the state variable yields “org.ajax4jsf.component.SequenceDataAdaptor$1@f63387”. I had a quick look around the web for the source, but had no luck.
Does anyone know which property of the dataTable will give me the row index?
What you need is the
rowKeyVarattribute.