Skip to Content
author's profile photo Former Member
Former Member

Finding recursively the iViews assigned to a Role - Portal Component


I am trying to make a Portal Component where in I need to know what iViews are assigned to any particular role in a recursive manner.

Currently by using the following code I can search the iViews recursively in the portal_content folder structure but not in the roles,

Hashtable env = new Hashtable();

env.put(IPcdContext.SECURITY_PRINCIPAL, request.getUser());
env.put(, PcmConstants.ASPECT_SEMANTICS);

InitialContext ctx = null;
DirContext dirCtx;
List iViewList = null;
ctx = new InitialContext(env);
dirCtx = (DirContext) ctx.lookup("pcd:portal_content");

PcdSearchControls pcdSearchControls = new PcdSearchControls();

dirCtx.addToEnvironment(Constants.APPLY_ASPECT_TO_CONTEXTS,	Constants.APPLY_ASPECT_TO_CONTEXTS);
NamingEnumeration ne ="","(", pcdSearchControls);
iViewList = new ArrayList();

while (ne.hasMoreElements())
	IPcdSearchResult searchResult =	(IPcdSearchResult) ne.nextElement();
	String location = searchResult.getName();

Iterator i = iViewList.iterator();

	response.write("<br />" +;

I need to find the iviews that are currently assigned to a particular role for which PCD path can be given at the time of making the iVIew from this component.

Please let me know how to go about this.


Saurabh Agarwal

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 21, 2011 at 11:53 AM


    Somebody please help on this one.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.