Documentum D2 Action and Event

Options
devil1987
devil1987 Member
edited August 31, 2016 in Documentum #1

Dear All,

My requirement is to reload the Documentum D2 4.6 external widget URL on event D2_EVENT_OBJECT_SELECTED.

I have :

1. configured EXT_WIDGET_TEST with bidirectional check box checked.

2. Mentioned widget URL http://localhost:8080/myWidget?Id=$value("r_object_id")

My widget is loaded in the workspace. However when I select any object in Doclist widget, my widget does not reload with selected r_object_id of object selected.

myWidget is getting connected and is :

  • subscribing channel ["D2_EVENT_OBJECT_SELECTED"]
  • publishing actions to channel ["D2_ACTION_REFRESH_WIDGET"]

I can see that I am passing oam_id:d2Ajaxhub.getWidgetId() and widget_type as d2Ajaxhub.getWidgetType() and is passed properly as is seen in console and also in alert which I have put. Where d2Ajaxhub has been initialized inside myWidget html file which is displayed in the widget while loaded in workspace.

Can someone please tell me how do I reload my widget with $value("r_object_id") being dynamically passed to the URL being called.

Also one more point is when I don't select widget config with bidirectional, and simply mention widget url:

http://localhost:8080/myWidget?id=$value("r_object_id") and subscribe to D2_EVENT_OBJECT_SELECTED event:

it reloads the widget with proper r_object_id passed.

So my query is how does internal widget is able to reload my widget on select of object?

Also what am I doing wrong while writing bidirectional D2OAH script?

What should I publish so that my widget is reloaded with r_object_id in URL.

Many thanks in advance.

Tridib

Comments

  • DevDocEMC
    DevDocEMC Member
    edited August 31, 2016 #2
    Options

    any updates?

    I am having same issue on my externa bi-directional widget, somehow i am not getting my parameters like r_object_id from my widget url.

  • Maoulida Daoudou
    Options

    This one is outdated but just in case, it may help someone else.

    When you configure external widget with Bidirectional parameter unchecked (then false), the URL is called only once, when loading the widget. Hence, URL parameters are NOT renewed when you select another objet. This means you should use URL parameters only for values that wouldn't change during your session (like docbase name, user name, …). If you use Bidirectional widget, dynamic parameters can be retrieved through the event message. You receive this message as a parameter to the callback you define during the subscription to your relevant channel(s).