cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JD Daniels ...@datatrio.com>
Subject Re: [WOODY] - How to bind a repeater from other widget (or add filled in repeaters from another source )
Date Thu, 01 Apr 2004 17:51:29 GMT
Joerg Heinicke wrote:

> On 01.04.2004 19:24, JD Daniels wrote:
>
>>>>        //row.description.value = 
>>>> document.getOwnerDocument().getTagName("description");
>>>
>>>
>>>
>>>
>>> What part of it exactly returns null? With document you are already 
>>> at the document root, no need to call getOwnerDocument(). And you 
>>> must go to <item> first, before selecting description. And what is 
>>> getTagName()?
>>>
>> Sorry.. The full Line is:
>> org.mozilla.javascript.EvaluatorException: 
>> "file:/usr/tomcat/hosts/components/ROOT/modules/inventory/flow/inventory.js", 
>> line 138: Cannot convert null to an object.
>
>
> Unfortunately those error messages are not very expressive. But let's 
> go on with the below which has no "NPE"s.
>
>> getTagName()?? No Idea. found it hopping thru Java Docs in an attempt 
>> to throw something at it that would work.
>>
>> I am dom Illiterate :)
>
>
> I'm using http://xulplanet.com/references/elemref/ref_Node.html for 
> DOM questions. Good overview.
>
>>        row.description.value =document.getFirstChild().getLastChild();
>> Results in [ #text ]
>
>
> I didn't expect to be already on a text node. What's the result of 
> document.getFirstChild().getLastChild().nodeValue or 
> document.getFirstChild().nodeName ?

This is a sample of what is being loaded into document:
<InventoryItem>
    <id>4</id>
    <inventoryId>11033</inventoryId>
    <inventoryType>2</inventoryType>
   <description>100BBL Skidded pop tank, c/w tone tone paint, 
thie</description>
   <initialRate/>
   <monthRate>300.00</monthRate>
   <dayRate>15.00</dayRate>
</InventoryItem>

document.getFirstChild().getLastChild().nodeValue = ""
document.getFirstChild().nodeName = InventoryItem
document.getFirstChild().nodeName = InventoryItem

JD

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message