This section describes how to remove an iView from a page.
Set the parameters for a JNDI lookup in the PCD.
Syntax
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);
Perform a lookup of the page from which you want to remove an iView.
Syntax
InitialContext iCtx = null; try { iCtx = new InitialContext(env); IPage myPage =(IPage)iCtx.lookup( "pcd:portal_content/Desktop/finance"); ...
Remove the iView from the page. Use the atomic name of the iView.
Syntax
... myPage.removeiView("myIView"); } catch(NamingException e) { }