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

Iview Minimized or Maximized ?

Is there a way to tell programatically that an Iview has been <b>minimized/maximized</b> or even exists on a page?

If exists is it possible to find it's <b>order</b>?(Like where this iview exists on that page with many iviews on it)

All the inputs are greatly appreciated.

Thank you Guys!

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Sep 27, 2005 at 06:47 AM


    You can do a JNDI lookup in the PCD for the page, and check the iViews contained in the page.

    If you do a lookup based on the current user's personalized settings, you can also tell if the iView was removed by the user, even if the page was built with the iView in it.



    Hashtable env = new Hashtable();



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

    env.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_SEMANTICS);

    env.put(IPcdContext.PCD_PERSONALIZATION_PRINCIPAL, request.getUser());

    InitialContext iCtx = null;

    String pageID = "portal_content/DanielContent/DanRole/Folder1/Folder2/Page1";

    try {

    iCtx = new InitialContext(env);

    IPage myPage = (IPage)iCtx.lookup(pageID);

    Enumeration myIviews = myPage.getiViews();

    while (myIviews.hasMoreElements()) {

    Binding bind = (Binding) myIviews.nextElement();
    IiView myIview = (IiView) bind.getObject();






    • Since a page can have other pages in it, you first have to check if the current element is an instance of IiView, before casting it.

    • The attribute IAttriView.ATTRIBUTE_AVAILABILITY tells if the IView was assigned to the page and if the user has removed it. VISIBLE means its on the page, AVAILABLE means it is not on the page but the user can add it. MANDATORY means it must appear on the page and the user cannot remove it.

    • The attribute IAttriView.ATTRIBUTE_CODE_LINK lists the portal application on which the iView is based.

    • There is an attribute that tells what PCD object the iView is based on, but this is not returned by the IiView interface. I am not exactly sure how to get this.

    Hope this helps.


    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.