Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jorge Arzuaga on Jul 02, 2009 20:11
open dhtmlx forum
Scheduler xml structure for selects options

Hi i need add a select in my config.lightbox, i using the next code:

{name:"tipo_evento", height:130, map_to:"tipo_evento", type:"select",
            options:[
                {key:1, label:"Normal"},
                {key:2, label:"Moderate"},
                {key:3, label:"Critical"}
                ]
            },

my xml is

<data>
<event id="8">
<start_date>2009-07-02 14:00:00</start_date>
<end_date>2009-07-02 14:00:00</end_date>
<text>Nuevo 1</text>
<details>a</details>
<tipo_evento>Tipo 2</tipo_evento>
</event>
</data>


But this show the next error
node is null
node.firstChild.value=value||"";

in the line 2816 approximately

What is the problem? Thanks.

Jorge Arzuaga
Answer posted by Stanislav on Jul 03, 2009 14:37
You have define possible values of "tipo_evento" field as [1,2,3] - key values of options array
But in your XML, it has value which was not mentioned in list
         <tipo_evento>Tipo 2</tipo_evento>
As result editor fails located correct option inside select for data in XML ( maybe it is not the best implementation - to throw an error in such case, but it is how it works for now )

If you change value , to existing one
         <tipo_evento>2</tipo_evento>
or add such key value as "Tipo 2" to options array - problem will be resolved.