Lianja App Center Tiles
This article explains how to Publish your Apps, configure the appearance of your Apps' Tiles and create Tiles with dynamic content.
The target audience is developers who have read through and understood the Getting Started with Lianja tutorial.
As a user in the Lianja App Center you have one-click access to the Published Apps available to your login.
To load an App, scroll vertically through the Categories and just click on a Tile to load the App.
As a Developer in the Lianja App Builder, the App Center Home screen also includes a series of Tiles to lead you through the steps of developing a Lianja App.
- Create a Project
- Create an App
- Create a Database
- Create a Table
- Manage Data
- Manage Users
Lianja v5.1 introduced tabs for grouped Apps in the App Center. In the Lianja App Builder there is a separate Develop tab with tiles for Getting Started help and quick link tiles for common development actions.
These quick link tiles have been expanded in Lianja v5.3.
The Examples tab gives access to the example Apps included in the distribution:
You can create your own tabs to group your Apps by specifying the tab name in the App Center Tile 'Category' setting.
You can still access each of the different Workspaces at any time via the Modebar and the Documentation is also just a click away (as is the Application Repository from v5.0).
Publishing an App in the App Center
Desktop Apps need to be 'published' so that they will appear in the Lianja App Center.
Check the Publish attribute in the App tab of the App Inspector:
If the App Inspector is closed, click Settings in the Modebar then check the Publish attribute and click Done.
Settings is also where you control how your App's Tile will be categorized and its position and appearance.
In the screenshot above, the following settings have been specified:
|Category||Tile will be listed in the 'Tutorials' horizontal Category. For v5.1 and later, see below.|
|Caption||Tile title will be 'roledemo'.|
|Background color||Tile background color will be purple.|
|Tile size||Tile will be 2x1. Sizes can be from 1x1 up to 4x4.|
|Tile order||Tile will be ordered automatically (0). Specifying a non-zero for Tiles within a Category will order them from lowest to highest.
As soon as you click Done and return to the Home App Center screen, you will see the changes you have made to your Published App's Tile.
From v5.1, include the tab name in the Category setting. So to display the tile in the Examples tab, specify the Category as:
And here the tile has been added to the Workspaces category in the new Tutorials tab:
Dynamic Tiles are Tiles whose contents are based on a script. The script can generate HTML output or just output a URL which will be rendered by an AJAX call inside the App Center. Any of the supported scripting languages can be used.
The contents of the Dynamic Tile are updated every time the Dynamic tile timer interval (in seconds) expires.
This example (example_dynamictile1 - 'Employee Sales by Year') runs the businessoverviewmonth.rsp script to output HTML and updates every 5 seconds.
The other Demo Dynamic Tile samples included in the distribution (example_dynamictile2 - 'Product sales by month' and example_dynamictile3 - 'Product sales by region') show how to output a URL for a Google Chart.
Note that here the Dynamic contents Attribute has been checked. If this is set to True, the Dynamic Tile is used for display purposes in the App Center only and users cannot run the App. Set to False and you still have your Dynamic Tile, but it can also be clicked to give users access to the App.
Lianja v5.1 introduces Dynamic Badges. These work in a similar way to Dynamic Tiles, but display an informational 'badge' on an App Tile. The badge contents are based on a script. The script can generate HTML output or just output a URL which will be rendered by an AJAX call inside the App Center. Any of the supported scripting languages can be used.
The contents of the Dynamic Badge are updated every time the Dynamic Badge timer interval (in seconds) expires.
Custom App Parameters
From Lianja v6.3 the Tile URL attribute can be used to specify an App to be opened when the tile is clicked and custom parameters for that App.
The following parameter name=value pairs can be specified:
|database||database=southwind_companyxxx||The specified database will be used as the runtime database for the App.|
This allows multiple App tiles to open the same core App, but each using a different database (with the required table names and structures), e.g. for different companies or clients.
|page||page=page2.section1||The specified Page and optional Section will be selected when the App is opened.|
|search||search=WOLZA||The specified search will be run on the selected Page/Section when the App is opened.|
This is the equivalent of entering the search text in the Instant Search box or using the search action in a Lianja.showDocument() call.
|filter||filter=region eq 'East'||The specified filter condition will be applied on the selected Page/Section when the App is opened.|
This is the equivalent of the filter action in a Lianja.showDocument() call and similarly requires the use of OData Operators.
loginappFrom v9.0, including the loginapp=<appname> value pair in the roles list for a user will open the App specified in <appname> when that user logs in instead of displaying the App Center, e.g.