Show TOC Start of Content Area

Background documentation Adding Dynamic iViews  Locate the document in its SAP Library structure

A Web Dynpro dynamic iView is an iView placeholder that you can add to a page, and whose contents are determined at runtime. At runtime, another iView on the page can call the page service and specify which iView to display in the placeholder’s spot on the page.

With dynamic iViews, you can extend a Web Dynpro application by displaying non-Web Dynpro content on a Web Dynpro page without an IFrame.

In the page editor, add a dynamic iView as you would any iView. The dynamic iView template is located at:

Portal Content Content Provided by SAP Templates iView Templates Web Dynpro Dynamic Component iView

This graphic is explained in the accompanying text

 

Each dynamic iView on a page must have a unique ID. The ID is specified by the iView’s Dynamic iView ID property in the Web Dynpro category. The default ID value is DYNAMIC.

If the page contains one dynamic iView, you do not have to change the ID.

If the page contains more than one dynamic iView, you have to change the IDs so each one on the page has a unique ID.

This graphic is explained in the accompanying text

Setting the Content for a Dynamic iView

To specify the iView to display in place of a dynamic iView, call the page service’s setDynamicIView() method and specify the following:

     Dynamic iView ID (Dynamic iView ID property)

     PCD address of iView to display in place of the dynamic iView

IPageService pageService = (IPageService)
    WDPortalUtils.getService(IPageService.KEY);
        
pageService.setDynamicIView(
    "DETAILS","pcd:portal_content/nw2004sdemo/nw2004sDemo/nwmusicbox");

The page service also provides methods for showing and hiding dynamic iViews. The following hides the dynamic iView with the ID Details:

pageService.hideDynamicIView("DETAILS");

The specified iView is added as an embedded or isolated iView, based on the iView’s Isolation Method property.

 

 

 

End of Content Area