VLF-One tablet=Y automatically

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
User avatar
Dino
Posts: 95
Joined: Fri Jul 19, 2019 7:49 am
Location: Tail of the Dragon, Robbinsville, NC
Contact:

VLF-One tablet=Y automatically

Post by Dino » Fri Apr 16, 2021 5:39 am

Hi,

Maybe a quick question...(V15 EPC150030)

If you call a VLF-ONE application in the desktop for example like this:
.../LANSA/DEM/UF_OEXEC.html?Lang=ENG&FrameworkID=B17_FRAMEWORK&Material=Y&Desktop=Y
you get a lot of windows/tiles in the same screen with automatic tiling, etc.

and if you want to run the same VLF-ONE application in a tablet, you call it like these:
.../LANSA/DEM/UF_OEXEC.html?Lang=ENG&FrameworkID=B17_FRAMEWORK&Material=Y&Tablet=Y
and you get only one window at the time, which is great for cellphones and tablets.

Now, how you can have it automatically, meaning, I want to have only one URL, not two?
If I try:
.../LANSA/DEM/UF_OEXEC.html?Lang=ENG&FrameworkID=B17_FRAMEWORK&Material=Y
without indicating desktop or tablet, it defaults to desktop mode both in the tablet and the desktop, but if I am in a tablet, I want it to run one window/tile at the time, and if I am in desktop I want my multiple tiles.

MarkD
Posts: 687
Joined: Wed Dec 02, 2015 9:56 am

Re: VLF-One tablet=Y automatically

Post by MarkD » Sun Apr 18, 2021 3:01 pm

If you don't specify desktop=, tablet= or phone= on the URL at all it should default based on the device's screen width.
I think the defaults are <= 640 is a phone, <= 1007 is a tablet, >= 1008 is a desktop device.

If you have an alternative way to make the determination you could do that by creating a simple start up page named YourApplication.html (say).

People often do that with LANSA applications to simplify the sometimes complex URL that end users need to use by seamlessly redirecting them to the more complex URL that is required to start up.

In that you could have some Javascript logic that determines whether to use a .........Desktop=Y or ........Tablet=Y URL, then dedirect to that.

User avatar
Dino
Posts: 95
Joined: Fri Jul 19, 2019 7:49 am
Location: Tail of the Dragon, Robbinsville, NC
Contact:

Re: VLF-One tablet=Y automatically

Post by Dino » Tue Apr 20, 2021 1:40 am

Thank you Mark. You are correct is working with those values when no parameter indicated.

Post Reply