Skip to Content

Hiding portal role content with a simple iView

An SAP Netweaver Portal role is a menu that, once given to a portal user directly or through group membership, allows the user to see a predefined set of iViews and/or pages.

Normally to change the options visible in the portal role a portal administrator needs to change the role and maybe change the entry points and/or make specific options invisible. This can be a change control issue and, to be honest, turning on and off entry points etc in the role editor is not much fun. OK, with CE 7.1 there is a slightly nicer role editor, but…

So, I have developed a portal component that can be given to an appropriate portal user which allows them to toggle the settings for an iView to set/unset the entry points and invisibility options for a set of iViews in a PCD folder. (Don’t get me started as to why the invisibility flag has the name it has! Yes, to make something visible you need to set the invisibility flag to false. SAP loves the double negative…)

The PCD folder is set as a property of the iView called ParentFolder. Here is how the component might look at runtime…

image

The Update button sets the flags as specified.

 

14 Comments
You must be Logged on to comment or reply to a post.
  • I am getting the errors for the MessageType as well as btnExecute.setOKButton(true); setOKButton is not listed and IFname.setEnabled(false); is also throwing errors
    Can you let me know how do I rectify this
  • Hi

    this statement is throwing the particular error can to help me to resolve this

    folder = (Context) contentFolder.lookup(parentFolder.substring(15));

    [EXCEPTION]
    com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Portal Component
    Caused by: java.lang.NullPointerException
         at com.amat.zTest$zTestDynPage.doProcessBeforeOutput(zTest.java:110)

    • Looks like the string I am doing the sunstring on is shorter than 15 characters long! So, maybe print out the string and see why it doesn’t start with portal_content/…
      • hey
        when i am doing
        m_response.write(“Folder = ” + contentFolder.lookup(parentFolder.substring(15)) + “
        “);
        it throwing portal runtine error

        and when i m doing only
        m_response.write(“Folder = ” + contentFolder.lookup(parentFolder) + “
        “);

        nothing is getting displayed