Please disregard this question.  After looking through it more
thoroughly, I found that, for some reason, even existing childNodes
with the same name and attribute name as the one I was trying to add
show up as the same kind of "objectLinkHandler" and, even though the
Debug console will not open the childNode for inspection when I click
on it, it still has all of the same functionality as the
normal-looking lz.DataElement objects.


Thanks,

Justin

On Sat, May 12, 2012 at 1:28 PM, Justin Ellis <[email protected]> wrote:
> Hi all,
>
> I am trying to insert a new lz.DataElement into a dataset, but I am
> running into problems that it looks like are caused by a combination
> of the name of an attribute in the element and the fact that the value
> I am assigning to it is derived from another lz.DataElement's
> attribute.  I have tried adding the new element both by creating it
> and using "appendChild()", and also by using a datapointer's
> "addNode()" method with arguments.
>
> The problem appears to be the fact that my new element must have an
> attribute called "id," that I am setting dynamically.  My code looks
> something like this:
>
> var ele = new lz.DataElement("newChild");
> var temp = oldEle.getAttr("id");
> ele.setAttr("id", temp);
> root.appendChild(ele);
>
> This code adds a childNode to my root lz.DataElement, but instead of
> being a data element that looks something like '<newChild id="1"/>'
> when I inspect the root node, the new node comes up as '>>"
> onclick="$modules.lz.Debug.objectLinkHandler(event, 26)"><newChild
> id="1"/>'  The new node does not appear at all in my existing dataset.
>
> If I change the attribute name to anything other than "id," it works
> fine.  If I directly assign a string or number to temp (e.g., 'var
> temp="1"' or 'var temp=1') it also works fine, even though the
> variable temp is typeof=string when I test it in my original code.  Is
> there a workaround for this issue?
>
>
> Thanks,
>
> Justin
>
> --
> Justin Ellis
> 646-783-9387
> Fax: 866-448-6503
> [email protected]
> www.LightBulbLaw.com



-- 
Justin Ellis
646-783-9387
Fax: 866-448-6503
[email protected]
www.LightBulbLaw.com

Reply via email to