There seems to be a difference between a datasource created from xml and one created in code programatically as it handles the canEdit property. The canEdit property value seems to be lost when created directly in JavaScript.
Taking the Forms->Validation->Customized Binding example in feature browser, if you set canEdit="false" for the last name in the xml data source, the form responds correctly. However, if you create the datasource manually with the same settings, a normal text box is shown.
I may be missing something as this is my first efforts with the toolkit so please help me out.
Thanks
Taking the Forms->Validation->Customized Binding example in feature browser, if you set canEdit="false" for the last name in the xml data source, the form responds correctly. However, if you create the datasource manually with the same settings, a normal text box is shown.
Code:
isc.DataSource.create({
ID:"users",
fields : [
{ name:"firstName", title:"First Name", type:"text", length:"50", required:"true" },
{ name:"lastName", title:"Last Name", type:"text", length:"50", required:"true", canEdit:"false" },
{ name:"email", type:"text", title:"email", length:"100", validators: [{ type:"regexp",
expression:"^([a-zA-Z0-9_.\-+])+@(([a-zA-Z0-9\-])+\.)+[a-zA-Z0-9]{2,4}$"}] },
{ name:"password", type:"password", title:"Password", required:"true", length:"20" }
]
});
Thanks
Comment