To continue with this content, please log in with your Data Access ID or create a new account.
You may not be authorized to see this content. Please contact Data Access Europe for more information.
You are not authorized to see this content.
Lesson 7 - Page title
- This lesson will show how to manually change the title of an application.
- The page title consists of 2 parts: the Application Title and the View Caption. Both can be set using a property.
- For the Application Title, psApplicationTitle is changed in the Webapp Source
- The View Caption can be changed by altering the psCaption for a view.
- Apart from those properties, a title can also be manually built using two methods:
- UpdatePageTitle can be called at any time to manually trigger an update of the page title
- OnGeneratePageTitle can be implemented in the WebApp source to generate a custom title.
- From the WebApp source, implement the OnGeneratePageTitle. Inside, write code to take the custom StateHash and append it to the page title.
- To do this, a string, sHash, is created. Next, check if there is a valid view handle, by adding If hoView Begin. Then, call on OnDefineCustomStateHash here to fill the sHash with…
- Send OnDefineCustomeStateHash of hoView (&sHash)
- Next we’ll append the sHash to the title by…
- Move (sTitle + “ – “ + sHash) to sTitle
- To make this work, expand the Custom Text form (VwPersonZoom.wo).
- Inside the onChange, add…
- Send UpdatePageTitle
- Compiling and running the application will show that when the form is filled out the value is now reflected in the page title.