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

Portal page URL

Hi all,

I am wondering if anyone knows how to retrieve the portal page URL into string form for an iView. I am attempting to compare To URL's. The iViews i am creating are written in JAVA.

Any help would be appreciated.

pacopaco@emailaccount.com

Thanks

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Feb 19, 2004 at 08:40 AM

    If I remember correctly it correctly you can do it like this if you're using a DynPage:

    IPortalComponentRequest request = (IPortalComponentRequest) getRequest();

    String iViewId = request.getComponentContext().getContextName();

    The iViewId then will hold the PCD URL to the iView. If you strip this URL for the part after the last '/' you will have the page URL accessible by prefixing it with "http:/<servername>:<port>/irj/index.html?NavigationTarget=ROLES://"

    Remember that this method is not 100% since a page might be accessible in different roles, but it's the best solution I've found.

    Another option would be to use the client framework:

    EPCM.subscribeEvent("urn:com.sapportals:navigation", "Navigate", onNavigate);

    This will give the page URL, but then the work must be done on the client...

    Add comment
    10|10000 characters needed characters exceeded