VL_WEB and Offline application

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Posts: 119
Joined: Tue Feb 23, 2016 12:00 am

VL_WEB and Offline application

Post by kno_dk » Thu Sep 07, 2017 4:45 pm

is it possible to create a VL_WEB application which can run online and offline on a small pc or tablet(maybe phone also) ? The application is a order entry application. The application should print an invoice in the truck before the driver leave the customer. The application should sync with the IBM I and run up against the IBM I when online. Sometimes the device will not have the connection to the internet, but it should still function. So it need a local database, sync to/from the IBM I and be able to print from the browser.
is it possible?
Is there some tutorial on the sync part/local database?
What about LANSA licensing? a WEB licens on the IBM I?
Is there anybody which have already build something like this and are willing to share code or selling the solution? They have only 6 trucks where this application should be used.


User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: VL_WEB and Offline application

Post by Stewart Marshall » Thu Sep 07, 2017 5:51 pm

VL supports off line processing, although there is no support for browser databases currently. Instead, data is stored in LocalStorage. This has a limited capacity of about 5Mb or more depending on the device.

When you're editing the webpage, there is an "Offline support" tab. Change the Use Application Cache option to Yes and you'll see all of the parts in the application listed. This will manage the cache manifest for you which is what the browser uses to determine what's required for the application.

Syncing is your responsibility. There's really nothing overly difficult about it. You just need to know that you've made changes on the client and then update the server when there is the opportunity to do so.

Printing from the browser is tricky as the various implementations are different. The best solution is to generate a PDF. Integrator has functionality for this, but if you don't have access to the server, it can also be done in JavaScript with something like PDFMake

The Home page in the IDE has a sample application "Mobile app with offline support" that should will you a few pointers.
Stewart Marshall

Independent IT Consultant

Posts: 634
Joined: Wed Dec 02, 2015 9:56 am

Re: VL_WEB and Offline application

Post by MarkD » Fri Sep 08, 2017 9:14 am

The latest VLF-ONE version ships with 3 examples that print on the client without any server contact.

The reusable part DF_T69RPO and widget DF_T69CTO that the 3 examples use are not specific to VLF-ONE.

They should be able to be copied and used in any VL-Web application.

Capture.PNG (75.79 KiB) Viewed 1225 times

Post Reply