[jboss-user] [JBoss Seam] - dataTable in two windows

lightbulb432 do-not-reply at jboss.com
Sun Jan 14 18:50:59 EST 2007


If you have the same page containing a dataTable open in two windows and you delete an element from one window (assume you've made delete functionality in your code to simply remove the injected @DataModelSelection from the entity and the EntityManager), then delete the same element from the other window (without refreshing first to pick up the deletion), something happens that I didn't expect.

Rather than the second delete not doing anything (because the underlying object for that row doesn't exist), it actually deletes whatever object is currently under the row index in place of where the previous row was before. Let me clarify:

table contains following elements:
a
b
c

In window one you delete a, and the table looks like this:
b
c

In window two because you haven't refreshed it still looks like
a
b
c

In window two you delete a. I would think that nothing should happen because a is already gone. However, here's what window two (and window one after refreshing) looks like:
c

Apparently clicking delete deleted whatever is currently in the row index position that a was in before, which is now b...

Do dataTables have some functionality to get around this or is this actually how this is supposed to work?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001600#4001600

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001600



More information about the jboss-user mailing list