I want to write an application with multiple pages for different user dialogs and views. How do I exchange information/data between pages?
You should use the DataDictionary class to maintain application-wide, cross-page objects and data values. For an example of this have a look at the DynaDb example. I recommend the following procedure: Find all data objects you want to share across pages. If all pages use the same set of information, you can simply group all data into on object (this is the way the DynaDb example works). Otherwise store two or more different data objects in the dictionary. You can then access (and change) this data objects from any page within the application. For more information on the DataDictionary usage, see the appropriate section in the tutorial. Whenever a page is about to be activated, its perform() method is called. This is the place where you can access the shared data to initialize the page before it is displayed. For more information on the perform() method see the DynaPage tutorial.
Related Questions
- I want to write an application with multiple pages for different user dialogs and views. How do I exchange information/data between pages?
- Does existence of different Java plug-in versions on users computer can negatively impact application access?
- Can I exchange sound clips or photo sets for different pages?