Skip to Content
This is one in a series on new features in the latest portal releases — 2004 SP Stack 20 and 7.0 (formerly 2004s) SP Stack 12. The features were listed in the blog What’s New in the Portal for 2004 SP20 / 7.0 SP12. Here’s another feature that customer’s have been requesting for a while now — the ability to set the URL dynamically for a URL iView. Or in other words, not to hard-code the URL at design time. What you can now do is get the URL from a parameter in the request to the URL iView. So when making a link to the URL iView, send a parameter (forcedURL by default) and set the value to the URL for the iView. The advantage is that a company that wants to create many URL iViews to different Web sites, can create one iView and then pass the URL as a parameter in the request for the iView.

Administrator Settings

Every URL iView can now determine whether it allows the URL to be set at runtime. There are two new URL iView properties:

  • Forced URL — Enable: Determines whether the URL can be set at runtime. If either this is true and there is no URL sent as a parameter, or this is false, the URL is taken from the URL property set in the PCD.
  • Forced URL — Parameter Name: By default, the URL iView looks for the forcedURL parameter, but you can tell the URL iView to look for a different property in order to set the URL.

image For the official documentation, see Setting the URL at Runtime. For more information on creating URLs to portal components or to navigation nodes, see Triggering Navigation. The APIs described here also enable you to add URL parameters.

Other Changes to the URL iView

There have been several other changes to the URL iView in recent versions, which it’s worth going over now:

  • Locale-Specific URLs: You can define different URLs based on the current user’s locale.
    For example, you can send English users to the main Google wWeb site and German user’s to the German site.
    image
    Select the Language-Specific URLs tab, and there you can specify URLs as well as parameters for each URL.
    You can get more information at Adding Language-Specific URLs
  • User/System Parameters: Soon (SP13/21), you will be able to pass user and system parameters, which are retrieved dynamically and added to the URL at runtime.
    For example, you can pass in a URL iView the current user’s mobile phone number or the last time the user’s password was changed.
    You can also pass system information, such as the authentication method or the server name.
    The following shows the new options for setting properties in the URL iView.
    image
To report this post you need to login first.

14 Comments

You must be Logged on to comment or reply to a post.

    1. Daniel Wroblewski Post author
      Hi Michael,

      Yes, that is true. I believe the main difference is that in the app integrator you can create the URL based on properties (that is, change the actual URI and not just the querystring). Also, the app integrator enables you to create customer exits for creating custom, dynamic properties. You also have additional properties in the app integrator, plus the whole language for building the URL. There might be differences in the authentication that is possible.

      Daniel

      (0) 
  1. Ashutosh Gulkhobre
    Hi,

    I am using WDPortalNavigation.navigateAbsolute(
         “ROLES://…..” ) to call a URL iview.
    Now how to send a forcedURL to this??

    Lets say, my URL iview points to http://www.gmail.com
    and forcedURL to yahoo.com.
    I am opening URL Iview (www.gmail.com) using WDPortalNavigation.navigateAbsolute in my JAVA WD application.

    How to set forcedURL parameter in WDJ. And is my method to navigate to URL iview is correct in this case ??

    Many Thanks!!
    Ashutosh

    (0) 
    1. Daniel Wroblewski Post author
      Hi Ashutosh,

      The navigation to the URL iView can be done via WD or portal component, as long as you send the appropriate request parameter.

      In the navigation method, there is a parameter called businessParameters, that lets you add parameters, which will be added as URL parameters in the request. This should work.

      You can add something like forcedURL=htpp://www.google.com. Remember, any parameters in the forced URL must be encoded.

      Let me know if you have any problems.

      Daniel

      (0) 
      1. Ashutosh Gulkhobre
        Already tried… here it is

        WDPortalNavigation.navigateAbsolute(
        “ROLES://portal_content/Dev/iViews/url_demo_role/demo_url”,
        WDPortalNavigationMode.SHOW_INPLACE,
        WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
        “forcedURL=http://www.sap.com” );

        No Luck 🙁
        Ashutosh

        (0) 
          1. Ashutosh Gulkhobre
            Hi Daniel,

            Thanks a lot .. its working.
            But now my problem is, I have a encoded URL using some encryption using current date and time. I cant put that URL as parameter..
            I am trying to set that url to parameter forcedURL and sending it in the link. But this doesnt work.

            I am thinking of concatenating navigation target and my encoded URL …But if there is any other way .. please let me know.

            Cheers!!
            Ashutosh

            (0) 
            1. Daniel Wroblewski Post author
              Hi Ashutosh,

              I lead you astray. I mixed up the businessParameters, and forgot that these are encoded and passed in the DynamicParameter parameter, and that you need to use the launcherParameters. Sorry.

              To be honest, I did not really understand what you are trying to do. Feel free to send me an email directly and we can discuss it further. I would imagine if you can’t send it as a straight URL parameter, your in trouble.

              Daniel

              (0) 
  2. Ashutosh Gulkhobre
    Hi Daniel,

    Thanks for the response.
    What I have coded is this.

    String forcedURL = URLEncoder.encode(“http://www.google.com/search?hl=en&q=Baseball“);
    WDPortalNavigation.navigateAbsolute(“ROLES://portal_content/demo_role/demo_url”,
    WDPortalNavigationMode.SHOW_INPLACE,
    WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
    “businessParameters=forcedURL” );

    Tried using param=forcedURL. But no luck.

    Now can I pass forcedURL like this ??

    Many Thanks!!
    Ashutosh

    (0) 
    1. Daniel Wroblewski Post author
      Hi Ashutosh,

      I believe the businessParameters parameter is supposed to be in the form of: key=value&key=value& and you not put in the word businessParameters.

      So then you would make that paramter equal to “forcedURL=” + forcedURL.

      Daniel

      (0) 
  3. Dominik Witte
    Daniel,

    interesting blog and even more interesting feature. A question remains for me, though:
    Is server-side fetching provided also for these dynamically (i.e. user-selected) URLs? If so, I see a potential security issue here, as this feature might allow users to use the iView as some kind of reverse proxy to web applications that shall not be exposed.
    What is your opinion about this?

    Cheers,
    Dominik

    (0) 
  4. Hi Daniel,
    we are on 640 (NW04) SP22 but I can not see the two new parameters.
    Do they need to be activated somewhere first?
    Ta,
    Andi
    (0) 
    1. Shani Limor
      Hello Andi,

      Are the parameters missing when creating a new URL iView or are they missing for old URL iViews?

      If they are missing when creating a new URL iView, then most odds are that the HTTPCONNECTIVITY par file was not deployed correctly.

      Thank you,
      Have a great week,
      Shani

      (0) 

Leave a Reply