How to Write Set method....


I am not able to understand ,  how i can write                        set_value:function(node,value,ev){}



 



I am using a new      scheduler.form_blocks[“my_editor”]      



 



by following this link…



dhtmlx.com/dhxdocs/doku.php?id=d … tails_form



 



in my blocks,  4 text field, and 4 drop down field…



and  for configuration in init() method write…    {name:“location1”, height:100, type:“my_editor”, map_to:“auto” },



 



now i now able to understand how i can write set method…



my 4 select field is -  city, state,location,salesrep



and 4 text is -  subject, comment, desc, detail



 



i have write get method, that is working properly…



 



but not able to write set method…



i am writing.,…



 



set_value:function(node,value,ev){
                 node.childNodes[0].value=ev.subject;
                 node.childNodes[1].value=ev.details||"";
                  node.childNodes[2].value=ev.desc||"";



                node.childNodes[3].value=ev.comment||"";
                node.childNodes[4].value=ev.salesrep||"";



                node.childNodes[5].value=ev.location||"";



                node.childNodes[6].value=ev.state||"";



                node.childNodes[7].value=ev.city||"";
   }



 



but it is not working…   value is null…



any need to chage on any place…



ot any need to change…   in java connector



for additional field.//…



 



please help me…


Are properties location, details and others defined for events ?


How to define for events…



i can’t understand…how i can define…



 



please give me a example, how i can define event for field…


Probably there are the corresponding fields in the table of the database.


So, you should include these fields in the xml stream - the same way as you do that do for id, text, start_date and end_date.

hello,
           i write this all field in c.render_table();
and this field is in Database.
but i am not able to understand,....  how to
include these fields in the xml stream
 
can you tell  me files name or method name, where need to change...


Hello


for example there is a table with name “tevents” in your datebase, it has the following fields: event_id, start_date, end_date, text, subject, details, desc and comment. And if all this fields are necessary to scheduler configuration, the render_table method call should be the following:


c.render_table(“tevents”,“event_id”,“start_date,end_date,text,subject,details,desc,comment”);


In this case properties subject, details, desc and comment will be available in the set_value method by ev.subject, ev.details, ev.desc and ev.comment correspondingly.


Hello


for example there is a table with name "tevents" in your datebase, it has the following fields: event_id, start_date, end_date, text, subject, details, desc and comment. And if all this fields are necessary to scheduler configuration, the render_table method call should be the following:


c.render_table("tevents","event_id","start_date,end_date,text,subject,details,desc,comment");


In this case properties subject, details, desc and comment will be available in the set_value method by  ev.subject, ev.details, ev.desc and ev.comment correspondingly.


Hello,


       I have Define All field in Table...


    I have write all  field name in render_table  that is like  --- 


c.render_table("events","event_id","subject,state,city,zip,location,salesrep,customer,ranking,address,start_date,end_date,details","","",companyId);


and I have write Set_Value  like this...


 


set_value:function(node,value,ev){
                           s1=node.getElementsByTagName("input");
                           s1[0].value=ev.subject;


                           s1[1]=ev.state;
                           s1[3].value=ev.zip;
                           s1[4].value=ev.location;


                           function _fill_lightbox_select1(s,i,d){
                                 s[0].value=d.salesrep;
                                 s[1].value=d.customer;
                                 s[2].value=d.ranking;
                                 s[3].value=d.address;
           }
   s=node.getElementsByTagName("select");
   _fill_lightbox_select1(s,0,ev);
   }


 


But in subject() and in state it is showing undefined.,....


i am not able to understand , why it is showing undefined..


in JAVA connector, value setting is fine,  i have checked..


can you give me reason, and help me where i need to check.


please find attached pictrure of my screen

Screen.doc (189 KB)

First 3 fields in render date are reserved for start_date, end_date and text values, correct command will look as

c.render_table(“events”,“event_id”,“start_date,end_date,details,subject,state,city,zip,location,salesrep,customer,ranking,address”,"","",companyId);

Thanks , Its working…