This section describes how to set a page's default layout. A page's default layout is the layout used for rendering if the page's layout has not been personalized.
Set the parameters for the JNDI lookup.
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 for which you want to set the default layout.
Syntax
InitialContext iCtx = null; try { iCtx = new InitialContext(env); IPage myPage =(IPage)iCtx.lookup( "pcd:portal_content/Desktop/finance"); ...
Set the default layout by specifying the layout's atomic name.
Syntax
myPage.setActiveLayout("narrowWideNarrow");
Save the changes.
Syntax
... myPage.save(); } catch(NamingException e) { }