Configuring a Popup View
Let's assume you already have a primary view that contains some Tanks. At a glance, an operator can view some basic information on all the Tanks at a particular site, but they cannot see the additional information that is being collected that is unique to each Tank. The perfect way to display that unique information is to use a Popup View for each Tank.
Here is an example of how to use a Button component to set up a popup view for displaying the current tank temperature and history for the last 24 hours of the selected tank.
- First create a new view, and give it a name. You many want to assign a name that you can easily recognize as a Popup View and the Tank ID number (i.e., Popup100).
Next add some components to the Popup View. In this example, a Thermometer, Sparkline, and Label components were added.
Note: To display the additional data for all Tanks, you will need to create a Popup View for each Tank. You can use the Flex Repeater component to easily create multiple instances of components for display in another view each having the same look, feel, and functionality of the original components.
- Now, let's go back to the primary view and add a Button component for each of the Tanks and label them 'Temp'.
- Right click on the Temp button for Tank 100, and select Configure Events.
- The Event Configuration window opens. Under Events, select onClick.
- Under Organize Actions, click the Add
- You have several Popup Actions to choose from.
- Open - Opens the Popup View.
- Close - Closes the Popup View.
- Toggle - Opens and closes the Popup View. Select Toggle so you can use the Temp button to both open and close the Popup View for the specified tank.
- In the Configure Popup Action area under Select View, select your Popup View that you created in Step 1. This example uses Tank 100 and the Popup View is 'Popup100'.
- You also have some additional settings for customizing the behavior and appearance of your popup. Some of these options are set by default, and others you can customize. When you're finished, click OK.
Repeat Steps 4 through 9 for Tank 101 and Tank 102.
- Save your project.
- Now let's see how your Popup View works in a Perspective Session. While in the Designer, go to the top menubar and click Tools > Launch Perspective > Launch Session.
- Click on the Temp button for Tank 100. You'll notice Tank 100's Popup View will open displaying its Temp Data. You can drag the Popup View around the screen or even change its size.
- To close the Popup View, click either the Temp button, or click the Close