Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is locking and why is locking mandatory if I use server side synchronization?

0
Posted

What is locking and why is locking mandatory if I use server side synchronization?

0

Locking is a mechanism that prevents asynchronous data changes in the grids rised by a user. You can use locking in any place of your application every time you want to lock advanced GWT widgets controls. As soon as you locked the screen and finished necessary actions, you should unlock it. Don’t forget to do this step and note that on unlock event grid content will be refreshed. So, if you use callback handlers to synchronize data, you can lock and unlock a particular grid from these handlers. And no any other actions required to refresh the grid after synchronization. public class MyHandler implements DataModelCallbackHandler { private GridPanel panel; public MyHandler(GridPanel panel) { this.panel = panel; } public void synchronize(GridDataModel model) { //lock the grid panel panel.lock(); try { // synchronize data here } finally { // unlock the panel and refresh grid content panel.unlock(); } } } In case if you don’t use callback handlers, locking is not required and content will b

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123