Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by richard white on Nov 20, 2008 11:10
open dhtmlx forum
xml load errors

hi,

i am trying to load an xml document and it shows the following 2 errors:

val.firstChild is null
getText()(cell)dhtmlxgridcell.js (line 176)
_fillRow()(tr.ev_light, Element 0=Subject ID 1=cell 3=cell 5=Integer)dhtmlxgrid.js (line 767)
_process_xml_row()(tr.ev_light, row)dhtmlxgrid.js (line 763)
render_row()(0)dhtmlxgrid.js (line 842)
render_dataset()(0, 21)dhtmlxgrid.js (line 835)
_process_xml()(Object xmlDoc=XMLHttpRequest async=true mainObject=Object)dhtmlxgrid.js (line 809)
load()(Object entBox=div#gridbox.gridbox _wcorr=0 _f2kE=true, null, null, null, Object xmlDoc=XMLHttpRequest async=true mainObject=Object)dhtmlxgrid.js (line 776)
waitLoadFunction()()dhtmlxcommon.js (line 15)
[Break on this error] : "");val=val.firstChild.data};if ((val||"").toString()._dhx_trim() == "")
dhtmlxgridcell.js (line 176)

this._fillers is undefined
_insert_before()(0)dhtmlxgr...d_srnd.js (line 11)
_add_from_buffer()()dhtmlxgr...d_srnd.js (line 10)
init()()dhtmlxgrid.js (line 66)
[Break on this error] this.load(this.xmlFileUrl+getUrlSymbol(...(f[2]);this._fillers.splice(ind,1)}else

i am loading it with the following command:
grid.loadXML("../Views/TreesAndGridXMLs/QueryQuestionGrid_cf test occ.xml");

and i have noticed that it loads fine except when i had an xmlcontent tag for the coro cells, which of course i need to display the data. this works in other xm's but not this one so i am very confused. here is the xml:

<rows>

<head>
<column align="left" type="ro" width="200">Question</column>
<column align="left" type="ro" width="200">Operator 1</column>
<column align="left" type="ro" width="200">Criteria 1</column>
<column align="left" type="ro" width="200">Operator 2</column>
<column align="left" type="ro" width="200">Criteria 2</column>
<column align="left" type="ro" width="200">Display Data Type</column>

<beforeInit>
<call command="loadFilterTextBoxes"/>
</beforeInit>
</head>

<row bgColor="#FFECFF" id="general_subjectID">
<cell>Subject ID</cell>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell>Integer</cell>
</row>

<row bgColor="#FFECFF" id="general_studyNumbers">
<cell>Study Numbers</cell>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell>Text</cell>
</row>

<row bgColor="#FFECFF" id="general_sex">
<cell>Sex</cell>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell>Text</cell>
</row>

<row bgColor="#FFECFF" id="general_dob">
<cell>DOB</cell>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell>Date</cell>
</row>

<row bgColor="#FFECFF" id="question_1582">

<cell>
Childs diagnostic category at initial recruitment (DxRecruitment)
</cell>

<cell type="coro" xmlcontent="1">
Equal to
<option value="Equal to">Equal to</option>
</cell>
<cell>Healthy,Cystic Fibrosis</cell>

<cell type="coro" xmlcontent="1">
<option value="Equal to">Equal to</option>
</cell>
<cell/>
<cell>Lookup Value</cell>
</row>

<row bgColor="#EAFFEF" id="general_projectID">
<cell>Project ID</cell>
<cell type="coro" xmlcontent="1">Equal to</cell>
<cell>ALL</cell>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell>Lookup Name</cell>
</row>

<row bgColor="#ECF4FF" id="general_testOccasionID">
<cell>Test Occasion ID</cell>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell>Integer</cell>
</row>

<row bgColor="#ECF4FF" id="general_testDate">
<cell>Test Date</cell>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell type="coro" xmlcontent="1"/>
<cell/>
<cell>Date</cell>
</row>

<row bgColor="#ECF4FF" id="question_73">

<cell>
Child exposed to smoke in the last 24 hours? (SmE24)
</cell>

<cell type="coro" xmlcontent="1">
<option value="Equal to">Equal to</option>
</cell>
<cell/>

<cell type="coro" xmlcontent="1">
<option value="Equal to">Equal to</option>
</cell>
<cell/>
<cell>0 or 1</cell>
</row>

<row bgColor="#ECF4FF" id="question_74">

<cell>
Child regularly exposed to nonhousehold smoking? (SmE_Ot)
</cell>

<cell type="coro" xmlcontent="1">
<option value="Equal to">Equal to</option>
</cell>
<cell/>

<cell type="coro" xmlcontent="1">
<option value="Equal to">Equal to</option>
</cell>
<cell/>
<cell>0 or 1</cell>
</row>

<row bgColor="#ECF4FF" id="question_148">

<cell>
Total number of smokers living in the house (SmEnTot)
</cell>

<cell type="coro" xmlcontent="1">
<option value="Greater than">Greater than</option>
<option value="Less than">Less than</option>
<option value="Equal to">Equal to</option>
</cell>
<cell/>

<cell type="coro" xmlcontent="1">
<option value="Greater than">Greater than</option>
<option value="Less than">Less than</option>
<option value="Equal to">Equal to</option>
</cell>
<cell/>
<cell>Integer</cell>
</row>

<row bgColor="#ECF4FF" id="question_784">
<cell>Whether mother smoked at time of test (M_Smoke)</cell>

<cell type="coro" xmlcontent="1">
<option value="Equal to">Equal to</option>
</cell>
<cell/>

<cell type="coro" xmlcontent="1">
<option value="Equal to">Equal to</option>
</cell>
<cell/>
<cell>0 or 1</cell>
</row>

<row bgColor="#ECF4FF" id="question_851">

<cell>
Number of cigarettes mother currently smokes (M_SmNo)
</cell>

<cell type="coro" xmlcontent="1">
<option value="Greater than">Greater than</option>
<option value="Less than">Less than</option>
<option value="Equal to">Equal to</option>
</cell>
<cell/>

<cell type="coro" xmlcontent="1">
<option value="Greater than">Greater than</option>
<option value="Less than">Less than</option>
<option value="Equal to">Equal to</option>
</cell>
<cell/>
<cell>Integer</cell>
</row>
</rows>


thanks for your help
Answer posted by Support on Nov 21, 2008 02:08
Problem caused by using 
    <cell type="coro" xmlcontent="1"/> 
    <cell/> 

Grid expects that cell with xmlcontent attribute will have at least any content inside it.
To resolve issue - add some value to such cells,  or remove xmlcontent attribute from them. 

Answer posted on Nov 21, 2008 04:52
oh i see, ok thanks very much