Switch to the specified App .
Lianja.showDocument("app:example_webapp2")
showdocument("app:example_webapp2")
- Supported on the Desktop client only.
- Alternatively, use Lianja.openApp(), which is supported on all clients.
Lianja.openApp("example_webapp2")
Switch to the specified App and select the page .
Lianja.showDocument("app:example_webapp2:employees")
showdocument("app:example_webapp2:employees")
Applies MetaData attributes for all pages, their sections, and the fields, gadgets and columns in the sections.
Lianja.showDocument("applymetadata")
showdocument("applymetadata")
Applies UI presentation rules for all pages, their sections, and the fields, gadgets and columns in the sections.
Lianja.showDocument("applyrules")
showdocument("applyrules")
Sets the UI state(s) specified in the comma-separated string <statelist>.
Lianja.showDocument("changestate:state2,state3")
showdocument("changestate:state2,state3")
Causes all UI components to revert back to their default attributes (no UI state set).
Lianja.showDocument("resetstate")
showdocument("resetstate")
This is the same as clicking or touching the “Hamburger” Pages Menu icon. It is most useful in conjunction with gestures in mobile Apps.
Lianja.showDocument("back:")
showdocument("showpagesmenu")
Navigates to the previous Page in the history.
Lianja.showDocument("back:")
showdocument("back:")
Navigates to the next Page in the history.
Lianja.showDocument("forward:")
showdocument("forward:")
Select the specified Page <pageid>.
Lianja.showDocument("page:employees")
showdocument("page:employees")
Applies MetaData attributes for the page, its sections, and the fields, gadgets and columns in the sections.
Lianja.showDocument("page:page1?applymetadata")
showdocument("page:page1?applymetadata")
Sets the UI state(s) specified in the comma-separated string <statelist>.
Lianja.showDocument("page:page1?action=changestate&state=state2,state3")
showdocument("page:page1?action=changestate&state=state2,state3")
Resets current UI states.
Lianja.showDocument("page:page1?action=resetstate")
showdocument("page:page1?action=resetstate")
Selects the specified page.
Lianja.showDocument("page:employees?action=show")
showdocument("page:employees?action=show")
Redraws the page.
- Note that this includes right sidebar content gadgets.
Lianja.showDocument("page:customers?action=redraw")
showdocument("page:customers?action=redraw")
Allows the page to be saved as an Instant Report PDF.
Lianja.showDocument("page:customers?action=print")
showdocument("page:customers?action=print")
Hides the Navigation Panel.
Lianja.showDocument("page:customers?action=hidenavigationpanel")
showdocument("page:customers?action=hidenavigationpanel")
Shows the Navigation Panel.
Lianja.showDocument("page:customers?action=shownavigationpanel")
showdocument("page:customers?action=shownavigationpanel")
Hides the left Sidebar.
Lianja.showDocument("page:customers?action=hideleftsidebar")
showdocument("page:customers?action=hideleftsidebar")
Shows the left Sidebar.
Lianja.showDocument("page:customers?action=showleftsidebar")
showdocument("page:customers?action=showleftsidebar")
Toggles the left Sidebar (show/hide).
Lianja.showDocument("page:customers?action=toggleleftsidebar")
showdocument("page:customers?action=toggleleftsidebar")
Hides the right Sidebar.
Lianja.showDocument("page:customers?action=hiderightsidebar")
showdocument("page:customers?action=hiderightsidebar")
Shows the right Sidebar.
Lianja.showDocument("page:customers?action=showrightsidebar")
showdocument("page:customers?action=showrightsidebar")
Toggles the right Sidebar (show/hide).
Lianja.showDocument("page:customers?action=togglerightsidebar")
showdocument("page:customers?action=togglerightsidebar")
Searches for the specified value. Equivalent of using the Instant Search box.
Lianja.showDocument("page:customers?action=search&text=Cactus Comidas para llevar")
showdocument("page:customers?action=search&text=Cactus Comidas para llevar")
Filters the records based on the specified expression.
Lianja.showDocument("page:employees?action=filter&text=employeeid eq 3")
showdocument("page:employees?action=filter&text=employeeid eq 3")
showdocument("page:employees?action=filter&text=firstname eq 'Nancy'")
- On the Desktop client, the eq OData Operator must be used instead of the = Lianja operator in the filter text expression.
- On the Desktop client, if the alias pointer is specified in the filter expression, -> must be used (not .).
showdocument("page:employees?action=filter&text=employees->employeeid eq 3")
not
showdocument("page:employees?action=filter&text=employees.employeeid != 3")
- On the Web/Mobile client, OData Operators must be used in the filter text expression.
Lianja.showDocument("page:employees?action=filter&text=employeeid ge 8")
not
Lianja.showDocument("page:employees?action=filter&text=employeeid >= 8")
- To reset the filter, use:
Lianja.showDocument("page:employees?action=filter&text=")
showdocument("page:employees?action=filter&text=")
Collapses the top section on the Page.
Lianja.showDocument("page:customers?action=collapse")
showdocument("page:customers?action=collapse")
Expands the top section on the Page.
Lianja.showDocument("page:customers?action=expand")
showdocument("page:customers?action=expand")
Adds a new record and displays it in edit mode.
Lianja.showDocument("page:customers?action=add")
showdocument("page:customers?action=add")
Prompts to delete the current record.
Lianja.showDocument("page:customers?action=delete")
showdocument("page:customers?action=delete")
Refreshes the Page.
Lianja.showDocument("page:customers?action=refresh")
showdocument("page:customers?action=refresh")
Goes to the first record.
Lianja.showDocument("page:customers?action=first")
showdocument("page:customers?action=first")
Goes to the previous record.
Lianja.showDocument("page:customers?action=previous")
showdocument("page:customers?action=previous")
Goes to the next record.
Lianja.showDocument("page:customers?action=next")
showdocument("page:customers?action=next")
Goes to the last record.
Lianja.showDocument("page:customers?action=last")
showdocument("page:customers?action=last")
Lianja.showDocument("page:customers?action=last")
Refreshes the Section.
Lianja.showDocument("section:section1?action=refresh")
showdocument("section:section1?action=refresh")
- Supported on the Desktop client only.
- On the Web/Mobile client, page:<pageid>?action=refresh can be used on the Page’s primary Section.
Lianja.showDocument("page:customers?action=refresh")
Toggles edit mode on or off.
Lianja.showDocument("section:section1?action=edit")
showdocument("section:section1?action=edit")
- Supported on the Desktop client only.
- On the Web/Mobile client, page:<pageid>?action=edit can be used on the Page’s primary Section.
Lianja.showDocument("page:customers?action=edit")
Goes into edit mode. Remains in edit mode if already active.
Lianja.showDocument("section:section1?action=editmode")
showdocument("section:section1?action=editmode")
Recalculates calculated fields in the Section.
Lianja.showDocument("section:section1?action=recalc")
showdocument("section:section1?action=recalc")
Moves the record pointer by n records, either forwards (n is positive) or backwards (n is negative).
Lianja.showDocument("section:section1?action=move:2")
showdocument("section:section1?action=move:2")
Lianja.showDocument("section:section1?action=move:-2")
showdocument("section:section1?action=move:-2")
Moves the record pointer to record number n.
Lianja.showDocument("section:section1?action=goto:2")
showdocument("section:section1?action=goto:2")
Searches for the specified value.
Lianja.showDocument("section:section1?action=search&text=Ana Trujillo Emparedado")
Filters the records based on the specified expression.
Lianja.showDocument("section:section1?action=filter&text=firstname eq 'Nancy'")
showdocument("section:section1?action=filter&text=firstname eq 'Nancy'")
- Supported on all clients.
- On the Desktop client, the eq OData Operator must be used instead of the = Lianja operator in the filter text expression.
showdocument("section:section1?action=filter&text=firstname eq 'Nancy'")
- On the Web/Mobile client, OData Operators must be used in the filter text expression.
Lianja.showDocument("section:section1?action=filter&text=employeeid ge 8")
not
Lianja.showDocument("section:section1?action=filter&text=employeeid >= 8")
- To reset the filter, use:
Lianja.showDocument("section:section1?action=filter&text=")
showdocument("section:section1?action=filter&text=")
Searches the records within the current filter based on the specified expression.
Lianja.showDocument("section:section1?action=searchfilter&text=firstname eq 'Nancy'")
showdocument("section:section1?action=searchfilter&text=firstname eq 'Nancy'")
- Supported on all clients.
- On the Desktop client, the eq OData Operator must be used instead of the = Lianja operator in the searchfilter text expression.
showdocument("section:section1?action=searchfilter&text=firstname eq 'Nancy'")
- On the Web/Mobile client, OData Operators must be used in the searchfilter text expression.
Lianja.showDocument("section:section1?action=searchfilter&text=employeeid ge 8")
not
Lianja.showDocument("section:section1?action=searchfilter&text=employeeid >= 8")
- On the Web/Mobile client, call the section refresh after searchfilter:
Lianja.showDocument("section:section1?action=refresh")
- To reset the searchfilter, use:
Lianja.showDocument("section:section1?action=searchfilter&text=")
showdocument("section:section1?action=searchfilter&text=")
In a Page with Accordion behavior checked (True), selects the specified Section.
Lianja.showDocument("section:section4?action=select")
showdocument("section:section4?action=select")
Applies to TabView Sections. Selects the tab with the specified tabcaption.
Lianja.showDocument("section:section1?action=select&text=Shippers")
showdocument("section:section1?action=select&text=Shippers")
Applies to PanelView Sections. Select a panel by number according to its numeric position (n) in the Panels list:
Lianja.showDocument("page:pageid.sectionid?action=select&text=n")
Select the next panel:
Lianja.showDocument("page:pageid.sectionid?action=select&text=next")
Select the previous panel:
Lianja.showDocument("page:pageid.sectionid?action=select&text=prev")
Enable Cycle:
Lianja.showDocument("page:pageid.sectionid?action=select&text=cycle")
Applies UI presentation rules for this sections and its fields, gadgets or columns.
Lianja.showDocument("section:section1?action=applyrules")
showdocument("section:section1?action=applyrules")
Sets the Section SQL statement attribute to the specified sqlstatement.
Lianja.showDocument("section:section1?action=sql&text=\ select * from orders where customerid eq '{customers.customerid}' limit 2")
showdocument("section:section1?action=sql&text=\ select * from orders where customerid eq '{customers.customerid}' limit 2")
Sets the Section Where condition attribute to the specified queryexpression.
Lianja.showDocument("section:section1?action=where&text=customerid eq 'WILMK'")
showdocument("section:section1?action=where&text=customerid eq 'WILMK'")
- Note that the ‘WHERE’ keyword itself should not be included.
- The eq OData Operator must be used instead of the = Lianja operator in the queryexpression.
- Supported on the Desktop client only.
- On Web/Mobile client, set the corresponding WHERE section property with Lianja.getElementByID() or its synonym Lianja.get(), e.g.
Lianja.get("pageid.sectionid").where = "customerid eq 'WILMK'" Lianja.get("pageid.sectionid").requery()
Requeries the backend data source using the specified queryexpression to replace the WHERE clause condition and any other clauses that follow it such as LIMIT or ORDER BY.
Lianja.showDocument("section:section1?action=requery&text=\ customerid eq 'WILMK' limit 2 order by employeeid")
showdocument("section:section1?action=requery&text=\ customerid eq 'WILMK' limit 2 order by employeeid")
- Note that the ‘WHERE’ keyword itself should not be included.
- The eq OData Operator must be used instead of the = Lianja operator in the queryexpression.
- In versions prior to 3.0, supported on the Desktop client only.
- To requery removing the WHERE clause and any other clauses that follow it, use:
Lianja.showDocument("section:section1?action=requery&text=")
showdocument("section:section1?action=requery&text=")
When the Customer Accounts menu option is clicked, the Lianja.showDocument method is used to switch to page1.
//////////////////////////////////////////////////////////////// // Event delegate for 'customsectionmenu' event function startpage_section2_customsectionmenu(arg) { if (arg == "Customer Accounts") { Lianja.showDocument("page:page1"); } else if (arg == "Employees") { messageBox("Employees selected"); } else { messageBox("Products selected"); } };
https://www.lianja.com/doc/index.php/UI_Presentation_Rules
Perform a Lianja UI action or display a document in its associated plugin/application
// Lianja UI Actions showdocument("app:myapp") showdocument("page:page1") showdocument("page:page1?action=hide") showdocument("page:page1?action=show") showdocument("section:section1?action=select&text=Order Details") showdocument("section:section5?action=print") showdocument("section:section6?action=last") // Accessing local files using '.pdf' and '.docx' file associations showdocument("file:///C:\Users\Myuser\Documents\Documentation for HR\Attachments\Resume.pdf") showdocument("file:///C:\Users\Myuser\Documents\Documentation for HR\Attachments\Resume.docx") // Remote ftp URL showdocument("ftp://ftp.mycompany.com/latest.txt") // Example to create an HTML file display in the default browser fp = fcreate("htmlfile&(getpid()).htm") fwrite(fp, "<html>") fwrite(fp, "<body>") fwrite(fp, "<table>") fwrite(fp, "<tr>") fwrite(fp, "<td>Field1</td>") fwrite(fp, "<td>Field2</td>") fwrite(fp, "</tr>") fwrite(fp, "</table>") fwrite(fp, "</body>") fwrite(fp, "</html>") fclose(fp) showdocument("htmlfile&(getpid()).htm")
https://www.lianja.com/doc/index.php/SHOWDOCUMENT()