Show TOC

Procedure documentationRemoving iViews from a Page Locate this document in the navigation structure

 

This section describes how to remove an iView from a page.

Procedure

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

    Syntax Syntax

    1. 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);
      
    End of the code.
  2. Perform a lookup of the page from which you want to remove an iView.

    Syntax Syntax

    1. InitialContext iCtx = null;
      try
      {
          iCtx = new InitialContext(env);
          IPage myPage =(IPage)iCtx.lookup(
              "pcd:portal_content/Desktop/finance");
      
      ...
      
    End of the code.
  3. Remove the iView from the page. Use the atomic name of the iView.

    Syntax Syntax

    1. ...
      
         myPage.removeiView("myIView");
      
      }       
      catch(NamingException e)
      {
      }
      
    End of the code.