Apps [examples]

List the currently available Apps
LIST APPS
list apps

https://www.lianja.com/doc/index.phpLIST_APPS


Close the currently open App
CLOSE APP
close app

https://www.lianja.com/doc/index.php/CLOSE_APP


Close the currently open App
CLOSE APPLICATION
close application

https://www.lianja.com/doc/index.php/CLOSE_APPLICATION


Create a new App
CREATE APP
create app myapp

https://www.lianja.com/doc/index.php/CREATE_APP


Create a new App

CREATE APPLICATION

create application myapp

https://www.lianja.com/doc/index.php/CREATE_APPLICATION


Delete an App

DELETE APP

delete app myapp

https://www.lianja.com/doc/index.php/DELETE_APP


Delete an App
DELETE APPLICATION
delete application myapp

https://www.lianja.com/doc/index.php/DELETE_APPLICATION


Open an App
OPEN APP
open app myapp

https://www.lianja.com/doc/index.php/OPEN_APP


Open an App
OPEN APPLICATION
open application myapp

https://www.lianja.com/doc/index.php/OPEN_APPLICATION


Open an App for development
MODIFY APPLICATION
modify application myapp

https://www.lianja.com/doc/index.php/MODIFY_APPLICATION


Open an App for development 
MODIFY APP

 

modify app myapp

https://www.lianja.com/doc/index.php/MODIFY_APP


Switching between Apps

Switching between different Apps in Desktop and Web Apps is as simple as this:

Lianja.openApp("myappname")

This will cause the App named myappname to be loaded.

Sharing variables and other state information between Apps

You can use sessionstorage to share data between each App you load:

Lianja.sessionStorage.setItem("customer", "Barry")
Lianja.sessionStorage.setItem("caller", Lianja.application)
Lianja.openApp("viewcustomer")
 
// inside the ready delegate of the viewcustomer app
if Lianja.isRuntimeMode( )
    customer = Lianja.sessionStorage.getItem("customer")
    // lookup the customer and display information
    // You can return the originating app in a menu item delegate
    Lianja.openApp(Lianja.sessionStorage.getItem("caller")) 
endif

Hint: to share large objects between Apps use json_encode() and json_decode() of an object.

https://www.lianja.com/doc/index.php/Understanding_Lianja_UI_Navigation


In the ready delegate of your Web App you can access the arguments specified on the URL.:

If (typeof LianjaAppBuilder !== "undefined") return;  // ignore in development mode
var query_string = "";
var href = window.location.href;
var pos = href.indexOf("?");
if (pos > 0) query_string = href.substring(pos+1);
var argv = query_string.split("&");
for (var i=0; i<argv.length; ++i)
{
    arg = argv[i].split("=");
    argname = arg[0];
    argvalue = arg[1];
}

https://www.lianja.com/doc/index.php/Passing_parameters_to_Web_Apps


Advertisements