Methods

Your application invokes the following methods to render the Save to Topic dialog box.

  • getUserInfo—Gets the user privileges. The method returns the TopicsUserInfo value object, which contains the field CanSaveToNewTopic. If this field is false, you can disable the section for creating topics.

    The field allowedAttachments contains a list of the type of attachment types that are allowed for this user configuration. The values in the list can be TABLE, IMAGE, URL, FILE, or NOTE. Use this list to determine the types of attachments to include in your dialog. For the Save to Topic example in Figure 2-2, only TABLE and IMAGE are included.

    See Figure 2–3, Save to Topic dialog box with different attachment types, for an example of where the user can choose any attachment type. If allowedAttachments includes URL, FILE, and NOTE, then a user selects the attachment type from the Attachment type radio button. The user selects the radio button Application data for a table or image from the application, or selects file, note, or URL. The file and URL radio buttons have input fields to enter the file or URL. For the note type, the user enters the text for the note in the attachment description field.

  • getTopicContexts—Gets all topics to which the user can save an attachment and populates the existing topics drop-down list.

    Oracle Empirica Signal applications remember the most recent topic when the user saves an attachment. This topic becomes the default topic since users often save additional attachments to the most recent topic. You may design your application to remember the most recent topic.

  • getActionContexts—Gets associated actions using the user's selected existing topic.

    Oracle Empirica Signal applications remember the most recent saved action when the user saves an attachment. This action becomes the default action since users often save additional attachments to the most recent action. You can design your application to remember the last saved action.

  • getProjects—Gets a list of project names associated with your topics. This method is used when creating a topic.

    Oracle Empirica Signal applications remember the most recent project when the user saves an attachment to a new topic. This project becomes the default project for new topics since users sometimes create additional topics within the most recent project.

    When Oracle Empirica Signal applications populate the Project drop-down list, they combine the project names returned from the Oracle Empirica Topics web service with projects from other areas of the application. In this way, users can associate new topics with projects across the application. If your application categorizes objects by name, you can design your application to aggregate project names from topics with other names from your application and thus include all these category names in the Project drop-down list. If you specify a project name that does not already exist, the project name is saved as a new project when the topic attachment is saved.

    You can design your application to remember the most recent project when new topics are created.

    Figure 2-3 Save to Topic dialog box with different attachment types

    Save to Topic dialog box with different attachment types