ShowDocument

Posted: 2017-01-24 in ShowDocument

Incredibly powerful, but possibly less well know, is the showdocument() function and the corresponding Lianja.showDocument() method.
Here are some of the operations you can do with showdocument() and Lianja.showDocument():

  • Switch to another App
  • Switch to another Page
  • Navigate records: First, Previous, Next, Last, move relative, goto record number
  • Initiate data operations: Add, Edit, Delete
  • Search and filter data
  • Refresh ‘Visible when’ and ‘Readonly when’ Rules at Section or Page level
  • Change or reset UI States
  • Navigate to the previous or next Page
  • Hide or show the left and right Sidebars
  • Hide or show the Navigation Panel
  • Expand and collapse Sections
  • Select a particular Section in an accordion Page
  • Select a particular Tab in a TabView Section
  • Dynamically change Virtual Table queries

 


Q:
Is there an advantage to using Lianja.showDocument() method other than the ability to chain commands in a single call (which is very nice)? IOW, can all the same actions/settings be accessed using Lianja.get()? I ask because I seem to remember at one point that some things could only be done using showDocument.
A:
There are certainly some that are showdocument only – the hide/show of the navigation panel and sidebars and the UI States spring to mind.
Others are standard
section or pagemethods and will be calling the same code behind the scenes.


there should be only one colon, if used, following the first name: that tells the Get method of Lianja which part of the hierarchy to start searching.

So if section1 is on pgCreateTasks, your parameter to showDocument would be as below. Note that if you are starting at page level, the page: isn’t needed.

Code:
Lianja.showDocument("page: pgCreateTasks.section1?action=add");

 


Unlike Lianja.getElementByID(), Lianja.showDocument() needs to have a prefix of “section:” so that the specified action is performed against the section.


Q:
When using showdocument in a web browser, I can do a search on a section as follows.

Code:
Lianja.showDocument("page: page1.section3?action=search&text=King");

This will search on my search field (which is lastname) for King.
If I wanted to filter a section, what is the correct syntax?
This is clearly not correct.

Code:
Lianja.showDocument("page: page1.section3?action=filter&text=lastname = 'King'");

A:
From the new treeview app .js file:

Code:
function page1_section1_dblclick(title, key)
{
    Lianja.showDocument("page: page1.section4?action=search&text="+key);    
};
Code:
Lianja.getElementByID("page1.section4").refresh();

here is the OData syntax.

Code:
Lianja.showDocument("section:section2?action=filte r&text=contactname eq 'Jean Fresniere'"); 
Lianja.showDocument("section:section2?action=filte r&text=contactname eq ''");


Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s