• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Ashley Chen
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!