Show TOC

Background documentationLinking iViews Locate this document in the navigation structure

 

The content provider framework helps you create links between your content provider iViews. To create a link from one iView to another, pass to the transformer of your first iView the URL of the portal component of your second iView. The transformer can then add parameters to the URL, for example, a story ID, and create the complete link.

You can create the URL to a portal component with the following code:

Syntax Syntax

  1. IPortalComponentURI componentURI = request.createPortalComponentURI();
    
    componentURI.setContextName(m_serviceContext.getApplicationName()
        + "." + "NameOfPortalComponent");
    
    myUrl = componentURI.toString();
    
End of the code.

In the example above, the first line creates an IPortalComponentURI object from the request object.

The second line gets the URL for the portal component called NameOfPortalComponent located within the PAR that contains your content provider service. This PAR should also contain all your content provider portal components.

The third line converts the URL to a string and stores it in the variable myURL, which you can pass to the transformer for the current entity. To pass parameters to an entity's transformer, implement the getGeneralParameters() or getEntityTransformerParams() method in the entity class.