Results 1 to 4 of 4

Thread: Page / Form Load - Sequence of events

  1. #1
    Member
    Join Date
    Nov 2013
    Posts
    77

    Post Page / Form Load - Sequence of events

    hi,

    Can I have a brief explanation on what event(s) are best suited for initialization of things (variables/setting runtime properties) without interfering with Lianja's internal workings?

    Like for example there are the Init,Load, Ready, Activate events - what would be the best practice for initializing page/form level variables, setting properties of the sections. For example I want to show the form in the collapsed state initially. So which event will be ideal for me to do something like Lianja.getElementByID("section1").collapse()?

    Btw I should say you have a wonderful product! Waiting for it's final release :-)

    Thanks & Regards,
    Murali

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,674
    Hi Murali,

    The events are called in that order: init, load, ready, activate with the App first:

    App
    - first Page
    -- first Page's first Section
    --- first Section's Fields
    -- first Page's second Section
    --- second Section's fields
    -- ...
    --- ...
    - second Page
    -- ...
    --- ...

    If a variable is required by a particular component it would normally be declared/initialised in its init or the init earlier in the hierarchy. The database is available to the load events. For visual properties, such as the section.collapse(), wait until the internal loading and display have completed - put them in the ready event for the component.

    Regards,

    Yvonne

  3. #3
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,079
    Hi Murali,

    The INIT of the application or the INIT of the sections is a good place to instantiate variables used in sections. If a public variable is going to be used in more than one section, I used the application INIT.

    The READY of a section is the last thing to fire (except for the READY of the app): that's a good place to make arrange each section's initial look, as that way they each handle their own initial look. This could also be done from the application INIT, which might be useful if you wanted to select something other than the first page on the Page Navigation menu. This thread gives the details (last post in the thread from Barry): http://www.lianja.com/community/show...best-practices

    hth,

    Hank

  4. #4
    Member
    Join Date
    Nov 2013
    Posts
    77
    Hi,

    Thanks a lot Hank & Yvonne, for clarification and the information.

    Cheers,
    Murali

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us