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