This chapter explains how to integrate polling functionality into a Portal Framework application at design time.
This chapter includes the following topics:
For more information about using polls, see the "Adding Polls to a Portal" chapter in Building Portals with Oracle WebCenter Portal.
WebCenter Portal and Framework application users can create, edit, and take online polls on your application pages. Polls let you survey your audience (such as their opinions and their experience level), check whether they can recall important information, and gather feedback on the efficacy of presentations.
This section includes the following subsections:
In addition to taking available polls, users can do the following:
Quickly create and publish polls.
Customize an existing poll; for example, add or change questions, and publish (open) and close the poll
Take a specific or the most recently-published poll
View poll results
See the status of all polls and available actions for each poll, such as edit, delete, publish, analyze, and clear results
Polls is integrated with instant messaging and presence in the Polls Manager.
In a Framework application, polls requires a connection to the WebCenter Portal database schema. For details about setting up a database connection, see Section 4.2.2, "Setting Up a Database Connection."
At runtime, users can quickly create polls with just a name and a question. Figure 36-1 shows a sample quick poll.
WebCenter Portal application administrators can access the Polls Manager, which lets you create polls with multiple questions or with templates. The Actions dropdown list lets continue designing the poll, publish polls, analyze results, clear results, and delete the poll (Figure 36-2).
Polls created through the Polls Manager must be published and open to be taken. Users cannot take unpublished or closed polls.
For more information about using polls at runtime, see the "Adding Polls to a Portal" chapter in Building Portals with Oracle WebCenter Portal.
This section describes required steps for adding this to your application. It includes the following subsections:
Polls requires a connection to the database where the WebCenter Portal schema is installed. For details about setting up a database connection, see Section 4.2.2, "Setting Up a Database Connection."
This section explains a basic incorporation of polls. It includes the following sections:
Section 36.2.2.2, "How to Add the Quick Poll Task Flow to Your Page"
Section 36.2.2.3, "How to Modify the Polls Task Flow Parameters"
Polls task flows are described in Table 36-1.
Task Flow | Description |
---|---|
Poll - Quick Poll |
This task flow displays a view that enables users to create one-question polls to be published immediately. Each quick poll needs its own Quick Poll task flow on the page. |
Polls - Polls Manager |
This task flow allows users to perform administrative operations on polls. Any user who has access to this task flow can perform the administrative operations, such as edit or delete the poll. |
Polls - Take Polls |
This task flow displays the most recently-published available poll, unless it is set to a specific poll in the |
Polls - View Poll Results |
This task flow displays the results of a poll as a graph for the supplied |
The Quick Poll task flow display polls and provides tools to create, edit, and delete polls. It also provides controls for determining when a poll when it expires. This task flow lets you present polls to end users where manage controls are not needed.
To add the Quick Poll task flow to your WebCenter Portal Framework application:
Open the page on which you want to add polls functionality.
In the Resource Palette, expand My Catalogs, WebCenter Portal - Services Catalog, and Task Flows.
Drag Polls - Quick Poll from the Resource Palette and drop it onto the page inside of the af:form
begin
and end
tags.
When prompted, select Region as the way to create the task flow (and confirm with Add Library). This operation may take a moment to complete.
Click OK.
Save and run your page.
Polls task flows have optional task flow binding parameters.
In addition to providing required values for successful task flow rendering, you can use task flow parameters to customize the appearance and behavior of a task flow instance. For example, you can use parameter values to set which poll to display.
You can adjust the parameter values when you drop the task flows onto a page or after you have placed a task flow on a page:
Navigate to the Edit Task Flow Binding dialog by clicking the Bindings tab at the bottom of the page (next to the Source tab).
Under Executables, you'll see the task flow you added. Figure 36-4 shows an example of a Search task flow in the Executables section.
Figure 36-3 Page Data Binding Definition
Select the task flow, and next to the Executables heading, click the Edit selected element (pencil) icon.
In the Edit Task Flow Binding dialog Figure 36-4, revise the binding parameter values as required.
Figure 36-4 Edit Task Flow Binding Dialog for Polls Manager Task Flow
When you are finished, click OK.
Save and run your page to see the results.
Table 36-2 describes the properties that are unique to the Polls task flows.
Table 36-2 Polls Task Flow Parameters
Property | Description |
---|---|
|
The portal name from which polls are to be fetched. If this is supplied, then polls of that particular portal are shown. On the Home portal, when this parameter is not supplied, it fetches polls from all portals. This parameter appears in the properties for the Polls Manager task flow. |
|
This parameter determines whether to display all polls or only those polls created by the user. The default (No) is to show all polls. Set to Yes to display only those polls created by the user. If the This parameter appears in the properties for the Polls Manager task flow. |
|
The poll to display. This parameter appears in the properties for the following task flows.
|
|
This parameter determines whether users can edit a quick poll. When a quick poll is in Edit mode, a Design Poll box for editing the poll appears. When a quick poll is not a Edit mode, the Design Poll box for editing is not visible. This parameter appears in the properties for the Quick Poll task flow. |
Polls do not require security. Administrators control access to Polls task flows through the Resource Catalog, where they define the users and groups privileged to see polls. Security is driven by the page security on which the task flow exists or by the task flow permissions on that page. Any user who can see the task flow can edit the poll.
ADF security is configured by default if you created your application using WebCenter Portal's Framework application template. For information about configuring ADF security, see Section 74.3, "Configuring ADF Security."
This section describes optional features available with polls. It includes the following subsections:
The Polls Manager task flow provides a complete view of polls and perform actions on them.
To add this to your Framework application, follow the same instructions that you did for the Quick Poll task flow in Section 36.2.2, "Adding Polls Functionality at Design Time," but drag and drop Polls Manager onto the page.
This task flow displays published polls for users to take. It displays the most recently-published available poll, unless it is set to display a specific poll with the pollId
parameter. After a user submits a response for that poll, it displays the next most recently-published poll.
To add this to your Framework application, follow the same instructions that you did for the Quick Poll task flow in Section 36.2.2, "Adding Polls Functionality at Design Time," but drag and drop Polls - Take Polls onto the page.
The View Poll Results task flow displays the results of a poll as a graph for the poll supplied with the required pollId
parameter.
To add this task flow to your Framework application, follow the same instructions that you did for the Quick Poll task flow in Section 36.2.2, "Adding Polls Functionality at Design Time," but drag and drop Polls - View Poll Results onto the page.
Use the Polls data controls to build a customized user interface for polls with a Framework application or a custom task flow.
Polls includes two data controls to customize the user interface:
See Also:
Section 4.1.3, "Using WebCenter Portal Data Controls" for information on how to consume data controlsThe Take Poll data control contains the following methods:
This method lets users respond to a particular poll. Table 36-3 describes the required parameters for this method.
This method lets users respond to the most recently-published poll. It has no parameters.
Table 36-4 describes the required parameters for this method.
This method gets the poll results for a particular poll. Table 36-5 describes the required parameters for this method.
Table 36-6 describes the required parameters for this method.
The Polls Manager data control contains the following methods:
This method creates polls with multiple choice questions. Table 36-7 describes the required parameters for this method.
Table 36-7 addQuestion Input Parameters
Parameter | Type | Description |
---|---|---|
|
String |
The poll to display. |
|
String |
The text of the question; for example, What is your favorite color? |
|
String |
Corresponding list of options for the question. This should be line-separated list of options. |
|
Boolean |
True to allow multiple options to be selected; false to allow only a single option selection. |
This method creates complex polls with matrix-type questions. Table 36-8 describes the required parameters for this method.
Table 36-8 addQuestion Input Parameters
Parameter | Type | Description |
---|---|---|
|
String |
The poll to display. |
|
QuestionType |
Question type, either:
|
|
String |
The text of the question; for example, What is your favorite color? |
|
String |
Corresponding list of options for the question. This should be line-separated list of options. |
|
String |
Column options. |
|
Boolean |
True if the question is optional (that is, users can ignore answering it); false if question is mandatory. |
|
String |
Enables a comment field for users to provide feedback or enter personalized text with their answers. |
|
Integer |
Size for the comment field. To capture feedback, set this to 3; otherwise, set it to 1. This parameter value depends on the type of answer expected in the comment field. |
This method closes a particular poll. Table 36-9 describes the required parameters for this method.
This method closes a poll on a specific date. Table 36-10 describes the required parameters for this method.
This poll closes a poll at a set number of days after the poll is published. Table 36-11 describes the required parameters for this method.
This method closes as poll after a set number of responses have been collected. Table 36-12 describes the required parameters for this method.
This method creates a quick poll. Table 36-13 describes the required parameters for this method.
This method deletes a particular poll. Table 36-14 describes the required parameters for this method.
Table 36-15 describes the required parameters for this method.
This method edits a particular poll. Table 36-16 describes the required parameters for this method.
This method finds a particular poll. Table 36-17 describes the required parameters for this method.
This method displays all polls, as defined in its parameters. Table 36-18 describes the required parameters for this method.
This method displays polls created by a particular user. Table 36-19 describes the required parameters for this method.
Table 36-19 getPollsByUser Input Parameters
Parameter | Type | Description |
---|---|---|
|
String |
User name of the person who created the poll. |
|
Integer |
The index of the first matching result that should be included in the result set (0-n ... zero based). This is used for pagination. |
|
Integer |
The number or results to display. |
Table 36-20 describes the required parameters for this method.
This method publishes a particular poll. Table 36-21 describes the required parameters for this method.
This method publishes a poll on a specific date. Table 36-22 describes the required parameters for this method.