Difference between revisions of "SHOWDOCUMENT()"

From Lianjapedia
Jump to: navigation, search
Line 20: Line 20:
 
|valign="top"|page:<id>?action=<actionid>||Perform the specified Action <actionid> on the specified Page <id>.<br>?action=hide<br>?action=show<br>?action=print
 
|valign="top"|page:<id>?action=<actionid>||Perform the specified Action <actionid> on the specified Page <id>.<br>?action=hide<br>?action=show<br>?action=print
 
|-
 
|-
|valign="top"|section:<id>?action=<actionid>||Perform the specified Action <actionid> on the specified Section <id>.<br>?action=search&text=expression<br>?action=first<br>?action=last<br>?action=next<br>?action=previous<br>?action=add<br>?action=delete<br>?action=refresh<br>?action=hide<br>?action=show<br>?action=print
+
|valign="top"|section:<id>?action=<actionid>||Perform the specified Action <actionid> on the specified Section <id>.<br>?action=search&text=expression<br>?action=filter&text=expression<br>?action=first<br>?action=last<br>?action=next<br>?action=previous<br>?action=add<br>?action=delete<br>?action=refresh<br>?action=hide<br>?action=show<br>?action=print<br>?action=select&text=<tabcaption>
 
|-
 
|-
 
|}
 
|}
Line 28: Line 28:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
 +
// 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
 
// 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.pdf")
Line 34: Line 43:
 
// Remote ftp URL
 
// Remote ftp URL
 
showdocument("ftp://ftp.mycompany.com/latest.txt")
 
showdocument("ftp://ftp.mycompany.com/latest.txt")
 
  
 
// Example to create an HTML file display in the default browser
 
// Example to create an HTML file display in the default browser

Revision as of 13:12, 4 March 2013

Purpose

Function to perform a Lianja UI action or display a document in its associated plugin/application

Syntax

SHOWDOCUMENT(<expC>)

See Also

GETFILE(), SHOWHELP()

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:<id> Switch to the specified App <id>.
page:<id> Select the specified Page <id>.
page:<id>?action=<actionid> Perform the specified Action <actionid> on the specified Page <id>.
?action=hide
?action=show
?action=print
section:<id>?action=<actionid> Perform the specified Action <actionid> on the specified Section <id>.
?action=search&text=expression
?action=filter&text=expression
?action=first
?action=last
?action=next
?action=previous
?action=add
?action=delete
?action=refresh
?action=hide
?action=show
?action=print
?action=select&text=<tabcaption>

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")