Quantcast
Channel: SCN : All Content - Web Dynpro Java
Viewing all articles
Browse latest Browse all 1288

Issue while accessing properties of the PCD iview using PCD API

$
0
0

Hi,

 

    I am trying to access PCD iview properties using PCD API. I got the below exception:

 

    com.sap.portal.pcm.iview.admin.AttributeSetiView incompatible with com.sap.portal.pcm.iview.IiView

 

    Here is the code:

 

         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);

        String id = "pcd:portal_content/google";

        InitialContext iCtx = null;

        try {

        iCtx = new InitialContext(env);

        IiView result=(IiView) iCtx.lookup(id); // getting Exception at this line

        response.write(result.getAttribute("com.sap.portal.pcm.Title",request.getLocale()));

            }

        catch ( Exception e)

{

        response.write(e.getMessage());

}

 

   Can someone help me on this.

 

Regards,

Lakshmi


Viewing all articles
Browse latest Browse all 1288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>