Difference between revisions of "SHOWDOCUMENT()"
From Lianjapedia
Barrymavin (Talk | contribs) |
Barrymavin (Talk | contribs) |
||
Line 20: | Line 20: | ||
|valign="top"|page:<pageid>||Select the specified Page <pageid> | |valign="top"|page:<pageid>||Select the specified Page <pageid> | ||
|- | |- | ||
− | |valign="top"|page:<pageid>?action=<actionid>||Perform the specified Action <actionid> on the specified Page <pageid><br><br>?action=hide<br>?action=show<br>?action=print<br>?action=hidenavigationpanel<br>?action=shownavigationpanel<br>?action=showsearchpanel<br>?action=hidesearchpanel<br>?action=togglesearchpanel<br><br> | + | |valign="top"|page:<pageid>?action=<actionid>||Perform the specified Action <actionid> on the specified Page <pageid><br><br>?action=hide<br>?action=redraw<br>?action=show<br>?action=print<br>?action=hidenavigationpanel<br>?action=shownavigationpanel<br>?action=showsearchpanel<br>?action=hidesearchpanel<br>?action=togglesearchpanel<br><br> |
Actions apply to the primary section where applicable: | Actions apply to the primary section where applicable: | ||
<br> | <br> | ||
Line 38: | Line 38: | ||
?action=filter&text=expression | ?action=filter&text=expression | ||
|- | |- | ||
− | |valign="top"|page:<pageid>.<sectionid>?action=<actionid><br> (or for current Page)<br>section:<sectionid>?action=<actionid>||Perform the specified Action <actionid> on the specified Section <sectionid><br><br>?action=add<br>?action=delete<br>?action=edit<br>?action=editmode<br>?action=first<br>?action=last<br>?action=next<br>?action=previous<br>?action=recalc<br>?action=requery&text=queryexpression<br>?action=sql&text=sqlstatement<br>?action=refresh<br>?action=hide<br>?action=show<br>?action=print<br>?action=search&text=<expression><br>?action=filter&text=<expression><br>?action=select<br>?action=select&text=<tabcaption><br>?action=showsearchpanel<br>?action=hidesearchpanel<br>?action=togglesearchpanel<br>?action=showsearchpanel<br>?action=hidesearchpanel<br>?action=togglesearchpanel<br> | + | |valign="top"|page:<pageid>.<sectionid>?action=<actionid><br> (or for current Page)<br>section:<sectionid>?action=<actionid>||Perform the specified Action <actionid> on the specified Section <sectionid><br><br>?action=add<br>?action=delete<br>?action=edit<br>?action=editmode<br>?action=first<br>?action=last<br>?action=next<br>?action=previous<br>?action=recalc<br>?action=redraw<br>?action=requery&text=queryexpression<br>?action=sql&text=sqlstatement<br>?action=refresh<br>?action=hide<br>?action=show<br>?action=print<br>?action=search&text=<expression><br>?action=filter&text=<expression><br>?action=select<br>?action=select&text=<tabcaption><br>?action=showsearchpanel<br>?action=hidesearchpanel<br>?action=togglesearchpanel<br>?action=showsearchpanel<br>?action=hidesearchpanel<br>?action=togglesearchpanel<br> |
|- | |- | ||
|valign="top"|changestate:<state>||Sets the specified UI state <state> | |valign="top"|changestate:<state>||Sets the specified UI state <state> |
Revision as of 10:33, 10 July 2014
Contents
Purpose
Function to perform a Lianja UI action or display a document in its associated plugin/application
Syntax
SHOWDOCUMENT(<expC>)
See Also
Description
The SHOWDOCUMENT() function displays a document in its associated plugin/application or performs a Lianja UI action. The <expC> is a URL, a file name or a Lianja UI Action.
Action | Description |
---|---|
app:<appid> | Switch to the specified App <appid> |
applyrules: | Applies UI presentation rules for all pages, their sections and the fields/gadgets/columns in the sections. |
page:<pageid> | Select the specified Page <pageid> |
page:<pageid>?action=<actionid> | Perform the specified Action <actionid> on the specified Page <pageid> ?action=hide ?action=redraw ?action=show ?action=print ?action=hidenavigationpanel ?action=shownavigationpanel ?action=showsearchpanel ?action=hidesearchpanel ?action=togglesearchpanel Actions apply to the primary section where applicable:
|
page:<pageid>.<sectionid>?action=<actionid> (or for current Page) section:<sectionid>?action=<actionid> |
Perform the specified Action <actionid> on the specified Section <sectionid> ?action=add ?action=delete ?action=edit ?action=editmode ?action=first ?action=last ?action=next ?action=previous ?action=recalc ?action=redraw ?action=requery&text=queryexpression ?action=sql&text=sqlstatement ?action=refresh ?action=hide ?action=show ?action=print ?action=search&text=<expression> ?action=filter&text=<expression> ?action=select ?action=select&text=<tabcaption> ?action=showsearchpanel ?action=hidesearchpanel ?action=togglesearchpanel ?action=showsearchpanel ?action=hidesearchpanel ?action=togglesearchpanel |
changestate:<state> | Sets the specified UI state <state> |
resetstate | Causes all UI components to revert back to their default attributes (no UI state set) |
The SHOWDOCUMENT() functionality is also provided in the Lianja system object showdocument() method.
Example
// 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")