Entering content frame

Procedure documentation Adding Related Items Locate the document in its SAP Library structure

You can associate iViews with other iViews or pages, so that when an iView is displayed, links to its related iViews and pages are displayed in the side navigation panel.

The following types of related items are available:

·        Related Links: Links to the related iViews and pages are displayed in the Related Links iView of the navigation panel.

·        Dynamic Navigation: The content of the related iViews and pages are displayed in the Dynamic Navigation iView of the navigation panel.

·        Target Components: Links to the related iViews and pages are displayed in the Drag&Relate Targets iView of the navigation panel.

For more information on Drag&Relate targets, see the SAP NetWeaver documentation on the Help Portal (http://help.sap.com) à SAP NetWeaver à People Integration à Portal à Administration Guide à Content Administration à Navigation à Drag&Relate Targets.

Procedure

...

       1.      Set the parameters for a JNDI lookup in the PCD.

Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,
    IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);

env.put(Context.SECURITY_PRINCIPAL, request.getUser());

env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);

       2.      Perform a lookup of the iView to which you want to add related items, and cast the object as an IiView object.

InitialContext iCtx = null;

try

{

    iCtx = new InitialContext(env);

    IiView myIView =(IiView)iCtx.lookup(iViewId);

}      

catch(Exception e)

{

}

       3.      Create a descriptor (INewObjectDescriptor object) for the iView or page that you want to add as a related link.

INewObjectDescriptor iViewDescriptor =
    (INewObjectDescriptor)iViewSrv.instantiateDescriptor
        (CreateMethod.DELTA_LINK,
           
"pcd:portal_content/testxml", request.getUser());

       4.      Add the related item descriptor to the iView.

myIView.addRelatedItem(iViewDescriptor,"testxml",
    RelatedItemType.DYNAMIC_NAVIGATION);

 

 

 

Leaving content frame