Login Register

clone

Dijit Cloning

I understand dojo.clone has some enhancements compared to plain node.cloneNode, but after trying unsuccessfully to use dojo.clone on a ContentPane with dijits as children, FilteringSelect, DateTextBox for example, and inserting the cloned ContentPane node with children into an AccordionPane, the objects render fine and are visible, but they have no dijit functionality; they're posers. I try to access the dojoType attribute and it doesn't exist in the child cloned elements, but it does in the ContentPane. Is this currently as intented? Is there any hope of dijit cloning for the future?

How to write a clonable widget

Hi,

I'm writing my first own widget and everything worked fine until I tried to create it programmatic and add it to a contentpane. Since I cannot pass to widget itself, I have to pass it's domeNode by calling

"myWidget.domNode".

But when I do this, the following exception will be thrown:

"Couldn't create widgets in dijit_layout_ContentPane_3 Error: Tried to register widget with id==dijit_layout_SplitContainer_1 but that id is already registered"

How to duplicate the selected object?

The selected object is a shape. How can I use the available "clone" function to duplicate this selection? I don't want to specify the shape: rect, circle, line etc, but just to duplicate a general shape. Thanks!

Syndicate content