Forums Register Login

how to reload data from db when using DataTable and preserveDataModel is true

+Pie Number of slices to send: Send
myfaces 1.1.5
tomahawk 1.1.5

I use Tomahawk DataTable in my app with preserveDataModel="true".
Every row in this table has a dropdown so the user can assign task to a
staff. When user hits "Save Changes" buttom, the changes will be saved and the screen will be redisplyed.

There are 2 users loging in in the same time. They both are in the same assignment screen.
Say in the begging, there are 2 rows in the screen:
Row1: staff1
Row2: staff2

UserA updates Row1 from staff1 to staff4 and saves it.
Then userB updates Row2 from staff2 to staff3. Since preserveDataModel is set to true, this is what is seen by user2:
Row1: staff1 (did NOT reloaded from db and got userA's change)
Row2: staff3 (updated by UserB)

What I really want to see after userB saves the change is:
Row1: staff4 (reloaded from db with userA's change)
Row2: staff3 (updated by UserB)

I do not know how to make this happens.

Any help is highly appreciated!!
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1498 times.
Similar Threads
Clipboard not copying right data
Write a method that can be called, that will initialize the seating plan.
Line spacing
button or link action not executed inside dataTable
Datatable Refresh Issue
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 22:54:48.