This article looks at uses and the mechanics of Container Extensions in Oracle Policy Modeling. This is the latest in our series about JavaScript Extensions. Here are the links to the other chapters for reference:
Introduction to Label Extensions | Video : Label Extension Overview in Intelligent Advisor |
Introduction to Input Extensions | Video : Input Extensions for Interviews in Intelligent Advisor |
Introduction to Options Extensions | Video : Option Extensions for Interviews in Intelligent Advisor |
Introduction to Search Extensions | Video : Search Extension for Interviews in Intelligent Advisor |
So what is a Container Extension. Well, given that a Container starts life as a <DIV> you could probably say that a Container Extension is a <DIV> or something similar. The question is, what to do with it? It is important to distinguish between a Container, an Entity Container and an Entity Collect. The Container is the basic structural item for creating multi-column layouts and other similar concepts in a Screen. It’s default name is Container, although you can change that for the purposes of making your Screen layout easier to read, it will not show up in the final Interview, it is just to facilitate the design phase:

What can you do with a Container : you can put anything you can think of inside it, and you can read attributes that are inside it using control.getControls() method thanks to the JavaScript API. There are some things to be aware of however when using Containers (getControls() will only return the first level of content for example) , and some things you should consider when thinking about whether you need a Container Extension or another type like Input Extension or Label Extension. The decisions will be based on what you need to do with your extension, and the limitations of the Container object. The Container has only mount, unmount and update keys so it is not best for validating inputs, for example.
Your Container Extension can add interactivity, aggregation or visual effects to your interview:

This 30 minute video is comprised of a presentation of the Container Extension, followed by a code-along explanation of container extensions. We will cover all the salient points and you will also discover that there is an Example Project that has Container Extension for you to look at and use as a starting point. In the video we will walk you through two other Container Extensions, one for dynamic charting (where we will discover a nice way to have real-time data display) and a second example with containers used for embedding content in your Interview.

Have a great day, and don’t forget to subscribe to our channel for more Oracle Intelligent Advisor content!