Q:

How (or is it necessary) to convert a Javascript Object to Dom

The following codes just try to clone a row and reset the id of the cloned:
rowTemplate = j('#component .form-list:first-child').clone();
var newRow = dojo.clone(rowTemplate);
dojo.attr(newRow, 'id', newRowId);

However, from firebug the third line give me
TypeError: node.setAttribute is not a function (dojo.js)

from debugging i can see the newRow is an Object(object[#row.class]), so the question is: How (or is it necessary) to convert a Javascript Object to Dom to make it available to dom functions?

A:

If you want to use a jQuery object with a dojo method, you have to convert the jQuery object into a dom element collection. This can be done using .get()
rowTemplate = j('#component .form-list:first-child').clone();
var newRow = dojo.clone(rowTemplate.get(0));
dojo.attr(newRow, 'id', newRowId);

disclaimer: I'm not familiar with dojo methods.

