Page [examples]

Create a page in the current App
CREATE_PAGE

 

// Create a page in the current App 

create page mypage

https://www.lianja.com/doc/index.php/CREATE_PAGE


To get a reference to a page with the id mypage.

Oitem = Lianja.getElementByID("mypage")

https://www.lianja.com/doc/index.php/Working_with_the_Lianja_Object_Model


// to set the value of an Attribute

Lianja.get("pageid").setAttribute("title","Page1")
// to get the value of an Attribute

cTitle = Lianja.get("pageid").getAttribute("title")

Note: on the desktop, the shortened form getAttr(name) is also available.

https://www.lianja.com/doc/index.php/Page_Attributes


Switching between pages

To switch pages just do this:

Lianja.showDocument("page:mypagename")

This will cause the page named mypagename to be made visible in the viewport.

https://www.lianja.com/doc/index.php/Understanding_Lianja_UI_Navigation


The left sidebar can also be hidden/shown using the showdocument() function or the Lianja.showDocument() method:

Lianja.showDocument("page:customers?action=hideleftsidebar")
Lianja.showDocument("page:customers?action=showleftsidebar")

https://www.lianja.com/doc/index.php/Left_Sidebar


The right sidebar can also be hidden/shown using the showdocument() function or the Lianja.showDocument() method:

Lianja.showDocument("page:customers?action=hiderightsidebar")
Lianja.showDocument("page:customers?action=showrightsidebar")

Note: in the Web/Mobile client the Page must start with a visible right sidebar (Show right sidebar attribute) to use the hiderightsidebar/showrightsidebar actions.

The URL of the content to be displayed.

In the example shown above a Google Chart is displayed (line breaks have been added to the URL here):

http://chart.apis.google.com/chart?cht=bvg&chs=160x202
&chd=t:{rsidebar2(  "{{customers.customerid}}" )}
&chds=0,20&chxt=x,y&chxr=1,0,20,5&chxl=0:|2009|2010|2011
&chco=fac400|FFFF42|4685e2&chtt=Orders per year&chbh=33
&chf=bg,s,EFEFEF|c,s,EFEFEF&chts=a9a9a9,10&chma=0,0,0,0

Note also the use of the rsidebar2 Lianja/VFP function (rsidebar2.prg).

The URL of the content to be displayed.

In the example shown above a Google Chart is displayed (line breaks have been added to the URL here):

http://chart.apis.google.com/chart?cht=bvg&chs=160x198
&chd=t:{rsidebar3( "{{customers.customerid}}" )}
&chxt=x,y&chxr=1,0,16000&chxl=0:|2009|2010|2011
&chco=fac400|ffff42|4685e2&chtt=Order amount (US$)&chds=0,16000
&chbh=33&chf=bg,s,EFEFEF&chts=a9a9a9,10

Note also the use of the rsidebar3 Lianja/VFP function (rsidebar3.prg).

https://www.lianja.com/doc/index.php/Right_Sidebar


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.