Topic
4 replies Latest Post - ‏2013-08-29T22:18:06Z by CBS3_Ian_Wilson
CBS3_Ian_Wilson
CBS3_Ian_Wilson
5 Posts
ACCEPTED ANSWER

Pinned topic Web site widget: Can you pass parameters into it?

‏2012-12-12T10:00:37Z |
The web site widget is great for displaying any web page, so it's a very simple candidate for quick customisation of a Business space page.

As far as I know, you can only configure the page with a simple URL. But what I want to know is, can you parameterize the URL string? For example, it would be great if you could pass a WOB ID into such a web page.

How about: http://myserver/ShowOrder.jsp?wob=%WOBID%

Is it possible to do this, or would it be necessary to create a custom widget that can do this?
  • Dave_Ward
    Dave_Ward
    2 Posts
    ACCEPTED ANSWER

    Re: Web site widget: Can you pass parameters into it?

    ‏2013-08-29T11:39:37Z  in response to CBS3_Ian_Wilson

    You should be able to achieve this by doing something along the following lines (I'm using the BSP Web Site widget with ICM 5.1.x so I'm hoping yours is the same)

    - Do not add a default web site / remove the www.ibm.com default in the widgets Edit mode so the widget is blank when the page initially loads

    - Wire an event to the Web Site widget that fires when you load a task / case, or click on a row in the Inbasket widget, etc.
    i.e.
    Command Widget (Send Case Info Event) --> Script Adaptor --> Web Site Widget (URL Event)

    - Resolve the parameter (%WOBID%) to the value in the current task / case. I normally use the Script Adaptor widget and a bit of JS to do this

    - Pass the entire new URL into the Web Site widget event
    i.e.
    return 'http://myserver/ShowOrder.jsp?wob=1234567890';
    OR
    return 'http://myserver/ShowOrder.jsp?wob=' + payload.systemProperties.workObjectNumber;

    I think you might also have to mess around with the WAS proxy settings if the target website is not on the same WAS server as the widgets.

    Cheers,

    Dave.
     

    • CBS3_Ian_Wilson
      CBS3_Ian_Wilson
      5 Posts
      ACCEPTED ANSWER

      Re: Web site widget: Can you pass parameters into it?

      ‏2013-08-29T13:48:24Z  in response to Dave_Ward

      Hi Dave,

      Long time no see, we should catch up some time.

      Thanks for the heads-up - I wish I'd tried dropping a script widget onto the page - the URL wire input immediately appears. Anyway, in the end I knocked up a custom widget that displayed web pages, and accepted work items as inputs. It had a lot more control over the display too, so was a bit better than the OOTB widget.

      (This is just the basic 4.5.2 ECM Widgets, not ICM+BSP.)

      I think these days with the move to Dojo, best to write these as Dijit widgets from now on, with the added benefit that they'd work in Content Navigator too.

      Ian.

      • Dave_Ward
        Dave_Ward
        2 Posts
        ACCEPTED ANSWER

        Re: Web site widget: Can you pass parameters into it?

        ‏2013-08-29T14:09:26Z  in response to CBS3_Ian_Wilson

        Hi Ian,

        Yeah, would be great to have a catch up. Are you in London much at the moment?

        Definitely agree about the move to Dojo. Can't wait for ICM 5.2 to ship so I can start to have a play!

        All the best,

        Dave.

        • CBS3_Ian_Wilson
          CBS3_Ian_Wilson
          5 Posts
          ACCEPTED ANSWER

          Re: Web site widget: Can you pass parameters into it?

          ‏2013-08-29T22:18:06Z  in response to Dave_Ward

          Unfortunately got no plans to be in London, but spending lots of time in Birmingham.