Using WebViewWidgets

From Lianjapedia
Revision as of 01:45, 27 May 2018 by Barrymavin (Talk | contribs)

Jump to: navigation, search

To keep coding (NoCode) to a minimum (save time) there are many built-in WebViewWidgets that can be used with Lianja.showDialogPanel(), Lianja.showDialog() or as the URL in a WebView section or in a custom WebView object created with createObject(“webview”).

Becoming familiar with these will speed up your development so its worth spending time to get to know them. You can study the code behind these to build your own custom WebViewWidgets.

Let’s take a look at these.

Data List View

lib:/datalistview.rsp?parameter=value&parameter=value...

Parameter Description Default value
database southwind
table customers
columns
hyperlink
sectionid

Example:

Lianja.showDialogPanel(
	"CUSTOMER LIST",
	"lib:/datalistview.rsp?database=southwind&table=customers&columns=customerid," +
        +"companyname&hyperlink=companyname&sectionid=customers.section1”);

Wvw-1.png

Lianja.showDialog(
	"CUSTOMER LIST",
	"lib:/datalistview.rsp?database=southwind&table=customers&columns=customerid," 
        + "companyname&hyperlink=companyname&sectionid=customers.section1”, 0, 0, true);

Wvw-2.png

PDF Document View

lib:/documentview.rsp?parameter=value&parameter=value...

Parameter Description Default value
file compressed.tracemonkey-pldi-09.pd

Examples:

Lianja.showDialogPanel(“DOCUMENT VIEW","lib:/documentview.rsp?file=compressed.tracemonkey-pldi-09.pdf")

Wvw-3.png


Lianja.showDialog("DOCUMENT VIEW","lib:/documentview.rsp?file=compressed.tracemonkey-pldi-09.pdf",0,0,true);

Wvw-4.png

Google Chart View

lib:/googlechart.rsp?parameter=value&parameter=value...

Parameter Description Default value
type The chart type; pie, map, gauge, donut, bar, column pie
title The title for the chart Untitled
data The data is specific to the type of Google Chart being generated TBA
options The options are specific to the type of Google Chart being generated TBA


Examples:

Lianja.showDialogPanel("GOOGLE CHART","lib:/googlechart.rsp");

Wvw-5.png

Lianja.showDialogPanel("GOOGLE CHART","lib:/googlechart.rsp”, 0, 0, true);

Wvw 6.png

Tree View

lib:/treeview.rsp?parameter=value&parameter=value...

Parameter Description Default value
database southwind
table customers
title companyname
key contactname
groupby country,region,city
filter
fields *
expandall false
onclick
ondblclick

Example:

Lianja.showDialogPanel("TREE VIEW","lib:/treeview.rsp")

Wvw-7.png

Lianja.showDialog("TREE VIEW","lib:/treeview.rsp”, 0, 0, true)

Wvw-8.png

Google Map View

lib:/googlemap.rsp?parameter=value&parameter=value...

Parameter Description Default value
address Boston,MA

Examples:

Lianja.showDialogPanel("CUSTOMER LOCATION","lib:/googlemap.rsp")

Wvw-9.png

Lianja.showDialog("CUSTOMER LOCATION”,”lib:/googlemap.rsp",0,0,true)

768px

OrgChart View

lib:/orgchart.rsp?parameter=value&parameter=value...

Parameter Description Default value
database southwind
table employees
titlebackcolor lightblue
columnid employeeid
keycolumn lastname
parentid reportsto
caption base64_encode(“title”)
description base64_encode("trim(firstname)+' '+trim(lastname)+'
'+etos(hiredate)"))
nodewidth 160
nodeheight 160
filter
customlibrary
clickdelegate
dblclickdelegate
backcolordelegate
forecolordelegate
editable
addcaption
showcontrols false

Examples:

Lianja.showDialog("ORGCHART VIEW","lib:/orgchart.rsp",0,0,true);

Wvw-11.png

Catalog View

lib:/catalogview.rsp?parameter=value&parameter=value...

Parameter Description Default value
database southwind
table customers
heading
cellfooter
cellfootertarget
cellfooterkey
image
imagewidth 200px
imageheight 200px
caption
subcaption
captiontarget
captionkey
details No details specified
filter
gridlines false
orderby
columns 1
readmore false
readmoresize 0
readmoresearchkey
readmorelink
paginate true
pagenumber 1
pagesize 8
sectionid
pagelinks 10
backcolor #e5e5e5
borderbottomandrightcolor #b0b0b0
bordertopandleftcolor lightgray
clickdelegate
dblclickdelegate
delegatelib
targetui

Examples:

Lianja.showDialogPanel(“CATALOG VIEW","lib:/catalogview.rsp")

768px

Lianja.showDialog("CATALOG VIEW","lib:/catalogview.rsp",0,0,true)

Wvw-13.png

Report View

lib:/report.rsp?parameter=value&parameter=value...

Parameter Description Default value
database southwind
table example
fields
groupby state
heading Report for all clients by state
headings
filter
hyperlink
columns 2,4,3,5,6,7,8,9,10,11
subtotals 9,10,11
gridlines

Examples:

Lianja.showDialogPanel(“REPORT VIEW","lib:/report.rsp”, “65%”)

Wvw-14.png

Lianja.showDialog("REPORT VIEW","lib:/report.rsp",0,0,true)

Wvw-15.png

Gallery View

lib:/galleryview.rsp?parameter=value&parameter=value...

Parameter Description Default value
database southwind
table employees
filter
orderby
tiledelegate defaultTiledelegate
caption alltrim(firstname)+' '+alltrim(lastname)+'
'+alltrim(address)+'
'+alltrim(city)+'
'+alltrim(region)+'
'+alltrim(country)
summary title
contentdelegate defaultContentdelegate
heading alltrim(firstname)+' '+alltrim(lastname)
content notes
contenturl
delegatelib

Examples:

Lianja.showDialogPanel(“GALLERY VIEW","lib:/galleryview.rsp")
  Wvw-16.png

Lianja.showDialog("GALLERY VIEW","lib:/galleryview.rsp",1000,600,true)

Wvw-17.png

Comments View

lib:/commentsview.rsp?parameter=value&parameter=value...

Parameter Description Default value
database southwind
table comments
category
childkey childkey
caption Comments about {customers.companyname}
topic
topics
username admin
refreshinterval 10

Examples:

Lianja.showDialogPanel("COMMENTS VIEW","lib:/commentsview.rsp", -850)

Wvw-18.png

Lianja.showDialog("COMMENTS VIEW","lib:/commentsview.rsp")  Wvw-19.png

Calendar View

lib:/calendar.rsp?parameter=value&parameter=value...


Parameter Description Default value
database southwind
table employees_calendar
view Month; valid values are Month, Week or Day
eventtypecolumn eventtype
filter
titlecolumn eventtitle
startcolumn eventstart
endcolumn eventend
alldaycolumn eventallday
repeatingcolumn eventrepeat
eventtypechoices Sales Meeting:yellow:black,Meeting,Vacation:gray:lightgreen,Sick:red:yellow,Appointment:green:white,Other
keyexpr
keyvalue
delegate calendar_click
rowid rowid
pageid
sectionid
columns
readonly false
hideformbar false
autoheight true
customdelegatelib
daybackcolordelegate
eventbackcolordelegate eventbg
eventforecolordelegate eventfg
targetui


Examples:

Lianja.showDialogPanel(“CALENDAR VIEW","lib:/calendar”, “65%”)

Wvw-20.png

Lianja.showDialog(“CALENDAR VIEW","lib:/calendar”, 1000,600)

Wvw-21.png