D2 v4.5 DQL Editor Widget – Part 1

One function of Webtop that I really miss in D2 is the DQL Editor.  So, as an exercise to learn how to create external D2 widgets that use bi-directional communication, I decided to build one.  Recall that the last D2 widget I build generated a bar code for the selected object in the Doclist widget, but did not employ bi-directional communication with D2 or the Docbase.

The D2 DQL Editor looks and functions similarly to the DQL Editor in Webtop (see figure).  And, as it turned out, was not too difficult to build, once I understood the OpenAjaxHub and its callback structure.  The rest of the widget is implemented as a JSP page with a Java servlet behind it.

DQL Editor

D2 loads external widgets into iFrames.  As part of the configuration of this widget, D2 passes the name of the current user and Docbase in the URL.  JavaScript in the widget parses this information out of the URL when it loads and saves it for use later.  The JSP then instantiate the OpenAjaxHub and subscribes to the D2_EVENT_DM_TICKET_GENERATED message.  When a DQL query is run, the widget publishes a request for a login ticket on the OpenAjaxHub.  Once the ticket is received, the query, the ticket, the user, and the Docbase name are passed to the servlet to be run.

In the following three posts (Parts 2, 3, and 4) I will discuss in more detail the various components of this external D2 widget.

You can download the WAR file and all of the source code for the D2 DQL Editor here.

Advertisements

About Scott
I have been implementing Documentum solutions since 1997. In 2005, I published a book about developing Documentum solutions for the Documentum Desktop Client (ISBN 0595339689). In 2010, I began this blog as a record of interesting and (hopefully) helpful bits of information related to Documentum, and as a creative outlet.

13 Responses to D2 v4.5 DQL Editor Widget – Part 1

  1. artika4biz says:

    Interesting widget Scott! I think it could be a very interesting example to learn how custom D2 widgets work. Thanks for sharing.

    Yuri Simione
    http://twitter.com/artika4biz
    http://linkedin.com/in/yurisimione

    Like

  2. David L. says:

    Would love to see this on GitHub!

    Like

  3. ian says:

    Hello,

    It is an interesting widget. The link is broken however. Thank you in any case for the great work!

    Like

  4. Pingback: D2 v4.5 DQL Editor Widget – Part 2 | dm_misc: Miscellaneous Documentum Information

  5. Pingback: D2 v4.5 DQL Editor Widget – Part 3 | dm_misc: Miscellaneous Documentum Information

  6. Pingback: D2 v4.5 DQL External Widget – Part 4 | dm_misc: Miscellaneous Documentum Information

  7. ari says:

    Hello ,
    I want to display query result in the standard doclistWidget.

    How do this ?

    Thanks

    Like

  8. Pingback: Fixed Links for D2 v4.5 DQL Editor Part 2 | dm_misc: Miscellaneous Documentum Information

  9. Pingback: D2 v4.5 Inbox Widget — Part 1 | dm_misc: Miscellaneous Documentum Information

  10. Pingback: D2 v4.5 Inbox Widget — Part 2 | dm_misc: Miscellaneous Documentum Information

  11. Pingback: Links to All of My Source Code | dm_misc: Miscellaneous Documentum Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: