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.


Add a comment
10|10000 characters needed characters exceeded

Related questions

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 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.