[Problem] Tried to register widget with id==xxx but that id is already registered

You may face this error while working with the Dojo widgets. The main reason behind this error is that you are trying to create a widget with an id that already exists. The holder of this id may be the same widget.

If it is the same widget then you can destroy the old attached Dojo widget before re-creating the new one again as shown:

attachedWidget = dijit.byId("xxx");
if (attachedWidget ) {			
    attachedWidget = null;
// Create the new attached widget here with the same id (xxx)...

If it is not the same widget then you can create the widget with another id without having to destroy the old one.

Invoking SCA Components from your Dojo iWidget Components in the WebSphere Process Server

To be able to call an SCA component from a Dojo iWidget component in a convenient way, you need to provide an HTTP Export for the SCA component. In this post, I will show you how to do this in details.

The complete post is here: https://www.ibm.com/developerworks/mydeveloperworks/blogs/hazem/entry/september_2_2011_10_42_pm?lang=en