B4J Question [SOLVED] [ABMaterial] Do I need add all my pages in Main module?

Xandoca

Active Member
Licensed User
Longtime User
Hi there,

Do I need add all my pages in Main module? Or could I add new pages when necessary?

The main point here is time to load initial page. Does the time to load the initial time depends on number of pages of the app?

B4X:
    '***** Start Init pages *********************************************
    
    Dim myPage As ABMPageTemplate
    myPage.Initialize

    Dim Homep As HomePage
    Homep.Initialize

    Dim about As AboutPage
    about.Initialize

    Dim usersp As UsersPage
    usersp.Initialize


    '****** End Init pages **********************************************

        
    ' add each of the pages to the app
    '***** Start Add pages ***********************************************

    myApp.AddPage(myPage.Page)
    myApp.AddPage(about.page)
    myApp.AddPage(Homep.page)
    myApp.AddPage(usersp.page)

For example, Can I only add usersp page to myapp after user is logged in my app?

Thanks
Alexandre
 

alwaysbusy

Expert
Licensed User
Longtime User
All pages must be added in main. ABM must know every page class to generate the html files at startup. A new instance of the class is only loaded when a user goes to a page. For the user experience the number of pages does not have any effect in loading time in the browser.
 
Upvote 0

Xandoca

Active Member
Licensed User
Longtime User
All pages must be added in main. ABM must know every page class to generate the html files at startup. A new instance of the class is only loaded when a user goes to a page. For the user experience the number of pages does not have any effect in loading time in the browser.
Thank you very much!!!
 
Upvote 0
Top