Page

Posted: 2017-01-21 in Page

I have added a new attribute in the page attributes “Full page edit“. This causes all sections on a page to be edited when the “Edit” tool button is clicked in the navigation bar (at the bottom) or the page is switched into edit mode using

Lianja.showDocument("page: page1?action=edit")



This provides for a better user experience when a page is laid out in multiple sections and you want to edit the complete “DataView” as opposed to just the main form section that has the “Search Key” field defined.

“Full page edit” also applies to Add – clicking the Page’s Add button or from an Add action:

Code:
Lianja.showDocument("page: page1?action=add")

Q:
how do I delete an object that is created?

Code:
myform = createobject("form")

A:

Code:
release myform

or

Code:

<pre class="bbcode_code"myform = .f.

If the form is displayed you need to close() it or release() it.


Q:
to declare a variable that is visible to all sections within a page
A:
Just put it in your namespace in the page init delegate.
e.g.

Code:
namespace PeopleKiosk 
public MyVar = 0

If you wanted to reference a formitem in the ‘Customer’ Form Section in example_webapp3, you would use the Lianja.get() syntax, e.g.

Code:
////////////////////////////////////////////////////////////////
// Event delegate for 'click' event
function page1_section2_field23_click()
{
        m_companyname.text = "";
        m_companyregion.text = "";
        messagebox(Lianja.get('page1.section1.field1').text);
}


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