Saving data in web client

Forum to discuss the Web client version of Servoy.

Saving data in web client

Postby amcgilly » Wed Jan 17, 2007 11:18 am

The docs say that autoSave doesn't work in the web client, and you have to issue a controller.saveData explicitly for data to be saved.

A couple questions about this:

1 - does databasemanager.saveData() also work when called from the web client?

2 - I have found that data changes are being saved in the web client when I navigate away from a record I've just edited, even when I don't issue a controller.saveData. It seems like the web client behaves the way the smart client behaves with autoSave turned on and setFocusLostSaveEnabled turned off. Is this in fact the case?

P.S. I notice that setFocusLostSaveEnabled has quietly disappeared from the method editor. Is that intentional?
Adrian McGilly
Servoy Developer

Image
amcgilly
 
Posts: 375
Joined: Fri Dec 09, 2005 12:03 am
Location: San Francisco, CA

Postby grahamg » Wed Jan 17, 2007 11:57 am

Hi Adrian

I've also noticed that navigating away from a record in WebClient saves data in same way as Rich Client. This is a great feature for users who *might* forget to click the 'Save' button.

Have been using controller.saveData to force an immediate save when I want the GUI to reflect changes.

Regards

Graham Greensall
Worxinfo Ltd
grahamg
 
Posts: 752
Joined: Fri Oct 03, 2003 3:15 pm
Location: Midlands UK

Postby Harry Catharell » Wed Jan 17, 2007 12:29 pm

Hi Adrian,

With regard to 'setFocusLostSaveEnabled', I believe that this is now deprecated in favour of databaseManager.setAutoSave() which performs the same function.

The Web Client will still honour transactions and so you can control save/revert operations using that technique.

The servoy_sample_crm solution demonstrates this if it is an option for you

Cheers
Harry
Harry Catharell
 
Posts: 812
Joined: Fri Sep 26, 2003 10:23 am
Location: Milton Keynes, England

Postby Westy » Wed Jan 17, 2007 5:06 pm

grahamg wrote:Hi Adrian

I've also noticed that navigating away from a record in WebClient saves data in same way as Rich Client. This is a great feature for users who *might* forget to click the 'Save' button.

Have been using controller.saveData to force an immediate save when I want the GUI to reflect changes.

Regards

Graham Greensall
Worxinfo Ltd


If the user unexpectly exits WebClient the data may not be saved. For this reason we have added an "Exit" button with a controller.saveData to our WebClient solution.

Dean
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 17 guests

cron