Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Programmatically getting iView Properties

Alright.. I am about to throw my laptop out of the window.. So before I do that I thought I would post my issue here.

Basically, I am trying to get some properties of an iView. Should be pretty basic.. Here is a code snipet..

Hashtable env = new Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);

env.put(Context.SECURITY_PRINCIPAL,request.getUser());

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sapportals.portal.pcd.gl.PcdInitialContextFactory");

env.put("com.sap.portal.jndi.requested_aspect","com.sap.portal.pcd.gl.PersistencyAspect");

InitialContext iCtx = null;

iCtx = new InitialContext(env);

IiView result =(IiView)iCtx.lookup("portal_content/Folder/iView");

What ALWAYS happens is that I get a NULLPOINTEREXCEPTION at the 'IiView result=IiView result =(IiView)iCtx.lookup("portal_content/Folder/iView");' line..

Any ideas.. is it something to do with my content configuration??

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question