Additional API methods

The Loginapp REST UI SDK provides methods to adapt the layout to page events:

Show moreShow less
class MyCustomLayout extends iam.api.types.CustomLayout { 
  
    // Invoked whenever the layout is active and a new page is entered/navigated to 
    onPageEnter() { 
        // ... 
    } 
  
    // Invoked whenever the layout is active and a page is left 
    onPageExit() { 
        // ... 
    } 
  
    // Invoked upon language change 
    onLanguageChange(language) { 
        // ... 
    } 
  
    // Additional HTML rendering that cannot be done using header/footer/content. 
    // Note that this method can be used in combination with methods headerHtml, footerHtml and contentHtml. 
    // Caution: this method can be invoked more than once on a page: 
    // when entering a page, but also every time when switching the language. 
    // For a correct behavior, it must therefore be ensured that previous renderings are undone. 
    render () { 
        // ... 
    } 
}

Note that equal API methods are first invoked on the layout and subsequently on the custom page. For example, onPageEnter() is invoked for all applicable layouts and afterward onPageEnter() is invoked for all applicable custom pages.