Stephen,

The problem here is that table remembers values for its stamped components for each row.
Each row's state is stored in a HashMap-like structure with row key used as a key.
After you delete a row from the list (row 2), row 3 has row key "2" because the row
key for the list-backed model is just a string representation of the index. I do not think
there is a way to clear the stamp state without validation/model update.

I believe the only way to fix this issue is to use a model that has consistent row keys,
which probably means implementing CollectionModel. You could also take a look at
SortableModel implementation (that is what table creates behind the scenes when you use jaav.util.List
as a model) and see if getRowKey() may be overridden. Note that you would also need to
get setRowkey() to work consistently as well.

Hope this helps.

Regards,
Max Starets

Stephen Friedrich wrote:
I am desperately trying to get a specific table UI to work - see screenshot.
In short I have a list-backed table model.
When displayed there's a delete button in front of row.
The first column is a selectOneChoice.
There's always one more row at the bottom than there are "real" values.
If the user selects a value from the dropdown, then another row is added.

Here's the catch:
Of course, neither the delete link nor the dropdown should trigger validation,
so I have set immediate="true" on them.

Unfortunately now the components on the page do not update correctly, for example
if I delete the second row (see screenshot) the page does indeed display one row
less, but the second row still displays the same data.

What the heck can I do to programmatically update the component-side of the model?







Reply via email to