Page

Q:

I have looked at the Page Center video and the example_PageCenter.

I am trying this in a web app.
When I Preview, how do I get it to start on the PageCenter page?

I tried this:
Under Settings, the Initial page is set to the pageCenter page. But it does not respect this. It always opens a page. (Clicking the Hamburger menu does go to the PageCenter page).

I compared my Settings to the Example settings. Didn’t spot anything obvious.

BTW I did a visual comparison. Is there a way to compare the settings of 2 projects automatically?
If it doesn’t already exist, it would be handy to be able to get a report of Settings and Attributes that are different from the defaults. This would help with learning from the sample apps.

When on the PageCenter page itself, is there a way to turn off the display of the Hamburger menu (because it doesn’t do anything):

Name:  2017-05-11_17-05-07.jpg Views: 40 Size:  27.8 KB

A:

Move the Page Center page in the Pages menu so that it is the first page loaded, then save and reload the App and the Page Center page will be selected:

Name:  pagecenter.jpg Views: 37 Size:  71.7 KB

The Page attribute ‘Hide hamburger menu’ is currently supported on the Desktop client only.

A2:

To hide the hamburger menu when you are using a page center page.

Name:  Screen Shot 2017-05-12 at 10.00.43 AM.jpg Views: 33 Size:  118.5 KB


Q:

For an APP with more than 1 pages, how can i set which page as the default first page?I look thru the attributes of APP settings to no avail.

A:

Settings -> General App Configuration -> Initial page

A2:

In the Navigation page drag the page you would like to be the default to the top of the pages list.


Q:

How can use a command button on click to set the attributes of objects in another page.
Name:  ljpage3.png Views: 26 Size:  11.2 KB

E.g. In page1, I want to set URL of page3:section1, and the label of page3:section2 to “abc”
So in page1 command button click, i put the following code

Code:
Lianja.get("page3.section1").url = "newform.html"
Lianja.get("page3.section2.lblText").caption = "abc"
Lianja.showDocument("page:page3?action=refresh")

 

However, the label and the webview remains unchanged.

A:

Code:
Lianja.get("page3.section1").url = "newform.html";
Lianja.get("page3.section1").refresh();
// Refer to Canvas formitems by their unique name in lower case
lbltext.caption = "abc";
Lianja.showDocument("page:page3");

 

Q2:

can you link to the Docs where lbltext.caption = “abc”; should be used as a direct reference please.

Been watching for quite a while and that caught me out somewhat…

A2:

Understanding the Lianja HTML5 Client: Building Canvas Sections for Web and Mobile


Q:

Page lifecycle? Specifically, I’m looking to understand whether all Pages are created when the app is started and destroyed upon app completion (close) or whether it’s possible to create a Page and have it destroyed at the end of it’s use. In our VFP apps, we often create modal forms and destroy them after collecting the necessary input or displaying the desired output.

A:

Lianja Mobile Apps are Single Page Applications (SPA). A single DOM is sent that contains no data, only the pages. That is the nature of SPA apps, and is the nature of Cordova/PhoneGap apps. Google Docs, etc. work the same way.

What is your concern? Remember that in the modern app age (of SPA apps), there is no monolithic huge app that hogs a ton of memory.

A2:

Lianja gives you the ability to define a form and release it when done;I do this in the custom vfp sections.

So within a single page, I can have many forms defined and show them when needed, then release them when done.

A3:

Look at Lianja.showDialog() and Lianja.showDialogPanel(). They provide the required functionality.


Q:

I have a page that has a Grid section. After double-clicking a row in the grid, I open a page that contains a canvas with fields from the record selected from the table shown on the grid from the prior page. The Actionbar shows that is on record #1. Should this show the record number that was selected from the prior page instead? Or do I need to refresh the Actionbar somehow?

A:

You will need to position the “cursor” on the canvas page. Lianja.showDocument can be used to both switch to the page and set a filter (if it’s a table) or requery (if a view).

A2:

treat them as separate, even though you will see one alias(). The alias is used to fill the control. So if you are using a parameterized view and don’t change the WHERE clause, those are the available records.

This is quite different from VFP, where moving the record pointer refreshes all attached controls (although the controls still have to be refreshed to show the change).

As always in Lianja, “think mobile” even if you are using a desktop. In mobile, the data is queried on the backend and then sent in an oData package to the UI. What’s there is there, although it can be filtered.

A3:

You can issue a refresh on the target page in its activate delegate. See also the page attribute “Refresh when activated”


Q:

Suppose in the event delegate for the click event of a command button I would like to open a page to collect some parameters and when the data entry for that page is complete, perform some sort of processing on the database based on the input from the page. How would I go about doing this? Is it possible to use Showdocument() modally to open the new page, and have control returned to the delegate after the page is closed? (Desktop only – I understand this probably doesn’t make sense in a web/mobile environment.)

A:

Have a look at showdialog and showdialogpanel. You can use these command to either pop-up or slide in another page to handle multiple documents.

You can also define a form as an object, and show it to handle inputs.


Q:

I have a page with a single canvas section. When the page is initially displayed, no control has the “focus”. After pressing tab one time, the focus moves to the control I have specified with Tab Order = 1. Successive tabs move through the controls in the correct order. When the last control is reached, tabbing cause the “focus” to move to what I’m guessing is some invisible control as none of my canvas section controls has the focus.

1. Is it possible to have the page start with focus on the first control?

2. Is it possible to prohibit the invisible control from being cycled through when tabbing?

3. How can I find this invisible control?

By the way, the Actionbar is off for the page.

A:

watch the events firing in the app inspector events tab.
you can set the focus to the first field in the page activate delegate.


Q:

can I hide the “X” to prevent the accidentally closed of the app?

A:

When using a form window you just need to set the closable property to false.



Q:

How do I change:
the order of the tiles on the Page Center page?

A:

I have added “Tile order” under the “Page Center Tile” attributes in the page attributes in the 3.5 release.


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