• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Water! People swim in water! Even tiny ads swim in water:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic