Display custom content in a drawer

Admin can create a custom smart action, this action will open a drawer with custom content. Variables like id, puid, and row are available to display custom content.

Custom content like Help can be displayed in drawer.Custom Content In Drawer

Custom Content In Drawer

Steps to Enable

Leverage Application Composer to expose and adjust page layout and attributes. To learn more about extending your application using Application Composer, visit Oracle Help Center > your apps service area of interest > Books > Configuration and Extension.

  1. Create a Smart action of type "Display Custom Content"
  2. In Container page add a new template in "Drawer Component" and write custom code.
  3. We can get id, puid, row variable using drawerContainerContext.puid
  4. In BeforeInvokeSmartAction pass the template id for specific smart action.
  5. To close drawer, we need to write following code to close drawer:

ActionsHelper.fireCXAction(ActionsHelper.ACTION_TYPES.CX_CANCEL_DRAWER);

ActionsHelper.fireCXAction(ActionsHelper.ACTION_TYPES.CX_CANCEL_DRAWER, undefined, { invokeAfterSmartActionExecutedCallback: true }) // This will invoke AfterSmartActio, can use for save data.

For Custom Object follow these additional steps in container page:

  1. Create a Variable drawerContainerContext
  2. Create event in cx-container and set parameter event to $event and add code in this event: if (event?.detail?.containerContext) {        $page.variables.drawerContainerContext = event.detail.containerContext;      }  
  3. In cx-container set param<oj-vb-fragment-param name="drawerMetadataProvider" value="[[ $metadata.dynamicContainerMetadata.provider ]]"></oj-vb-fragment-param>
  4. Drag and drop dyn-container and change name to drawerContainerLayout in json and html