In this section: |
You can use interactions in WebFOCUS Designer to program various objects to perform specific actions on the page. This feature allows you to go beyond simply displaying content on the assembled page and lets you configure an object, such as container, button, or control, to interact with other objects or content. The procedure of creating an interaction is done in the Interactions panel and requires no coding or syntax changes. A single page can have multiple interactions defined.
Examples of possible actions an interaction can perform include but not limited to the following:
You can open the Interactions panel in WebFOCUS Designer by clicking the Interactions button above the canvas, as shown in the following image.
Another way to access interactions is through the shortcut menu of most objects that could reside on the canvas. You can right-click a container, filter control, button, or any other control, point to Interaction and click Add. The Interaction panel opens prompting you to create an event for your interaction scenario.
Finally, you can add the Run Deferred and Schedule interactions directly from the Resources panel. On the sidebar, click Controls and then drag either Run Deferred or Schedule onto the canvas. Either of these controls adds an item on the canvas and simultaneously opens the Interactions panel where you can proceed with configuring your interaction. The Run Deferred and Schedule controls are shown in the following image.
In this section: |
How to: |
Once you complete all levels of a task, the interaction is deemed complete and the warnings disappear. There must be at least one complete task within an interaction for it to be complete.
Note: You can still add an interaction to a container inside a panel group.
In this example, we will add a simple single-task interaction to a content item.
WebFOCUS Designer opens and prompts you to select a template.
The Interactions panel opens, and the Select Event dialog box displays with the single option, Click, highlighted.
The Task 1 node is added to the interaction tree, and the Select an action level appears underneath the Task 1 node.
In this example, we will run another item in a page overlay.
The Select content level displays.
The Select Content dialog box opens displaying the Resources tree.
The Select a target level is added to the task.
The Select Target dialog box opens where you can choose the location for running your content. The options include: Container, Page overlay, New window, and Same window.
Your interaction is complete. Notice that it no longer displays as incomplete, and there are no more levels added to the interaction tree. Optionally, you can add more tasks to the interaction by clicking Add Task. If you do that, the Task 2 node will be added to the interaction tree. To disable or delete a task, right-click anywhere within the task node and select an option, as shown in the following image.
The page runs in a new window.
The target item runs in the page overlay, as configured.
In this example, we will add multi-task interactions to a button set.
In this example, we are choosing the Blank page template.
The grid container with a single button is added to your page.
You are left with the grid container with two buttons.
You can also remove the container title and toolbar by clicking the container and clearing the Show title and Enable toolbar checkmarks on the Settings panel.
An example of what your display should look like is shown in the following image.
The Interactions panel opens.
The Select Object dialog box opens. We will start by programming the first button to display a container and to run content.
Note: Notice that when you click an element in the Select Object dialog box, the same element gets selected on the canvas for easy navigation.
The Select Event dialog box opens.
The Task 1 node is added to the interaction.
The Select Action dialog box opens.
The Select Object dialog box opens.
The Task 1 node is complete.
The Select Action dialog box opens.
The Select Content dialog box opens displaying the Resources tree.
The Select a target level is added to the task.
The Select Target dialog box opens.
The Select Container dialog box opens.
The interaction for the first button is complete. Now we will program the second button to hide content.
The interaction for the second button is complete.
In our example we are renaming Button 1 to Show Content and Button 2 to Hide Content.
An example of the completed interactions for a button set is shown in the following image.
The page runs in the new browser window. Clicking the Show Content button runs the content, and clicking the Hide Content button hides the container. Finally, clicking the Show Content again displays the hidden container and runs the content inside it.
This scenario or its variations can be used as part of a larger structure with multiple interactions on a page.
In this example, we will add an interaction to a filter control.
Filters are added to the filter toolbar. We will program a filter to schedule content when used to change a selection.
The Interactions panel opens, and the Select Event dialog box appears.
The Task 1 node is added to the interaction.
The Select Content dialog box opens displaying the Resources tree.
The Select a mode level is added to the task.
The Select Schedule mode dialog box opens where you can choose the mode in which your scheduled content is shared. The options include: All, Email Library FTP, Email, FTP, Printer, Report Library, and Repository.
The Select Target dialog box opens where you can choose the location for the ReportCaster to run. The options include: Page overlay, New window, and Same window.
Your interaction is complete.
The page runs in the new browser window.
ReportCaster opens in the new browser window where you can configure the options for scheduling an email. To learn more about scheduling in WebFOCUS, see the ReportCaster technical content.
You can add interactions to the multi-content containers as a whole as well as individual content items within the container.
The Interactions panel opens.
The Select Object dialog box opens. Notice that you can select an entire container or one of its sub-elements. The following image shows how to target a specific tab of the tabbed container for an interaction.
Another way to see the distinction between these elements is to right-click a multi-content container. The shortcut menu is divided into two sections, Container and Content, each featuring the Interaction option, as shown in the following image.
How to: |
Interactions created with filter controls and certain unbound controls can be configured to use conditions. Whenever an interaction event is set to Selection Change, you can add conditions to the tasks within your interaction. There could be as many conditions as there are tasks inside an interaction, each set to perform a different action whenever a different value is selected. This adds a new layer of flexibility to your page.
In this example, we will add conditions to an interaction for a static unbound control.
In this example, we placed the unbound Dropdown control inside the unused cell of the filter toolbar, as shown in the following image.
The Edit Source dialog box opens.
In this example, we will add three items to represent three charts that the interaction will run.
An example of the populated Edit Source dialog box is shown in the following image.
The Task 1 node is added to the interaction.
The first of the three tasks is complete.
The Select Action dialog box opens.
An example of a completed interaction is shown in the following image.
The page runs in the new browser window.
The charts that correspond to the values run in the page overlay, as configured.
There could be a large number of interactions on any given page, which is why the best practice is to give each interaction a distinct name for easy editing. To edit an interaction, click the Interactions button above the canvas and, in the Interactions panel, select an interaction from the list. All tasks that belong to this interaction display below the list, as shown in the following image.
You can click any node to edit it by performing the prompted steps as described in the procedures above.
You can also add, delete, or disable tasks. If you disable a task, it is removed from the queue for execution while remaining in the interaction tree. The Disabled label and icon are added to the task, as shown in the following image.
Finally, you can right-click an interaction in the list to access its shortcut menu options, which include: Duplicate, Rename, Disable, and Delete.