Hi,
There are two fields in DataSource, both with canEdit property set to false.
The DynamicForm attached to this DataSource has corresponding items: one FormItem and one TextItem:
	I would expect that both of DynamicForm items will observe and respect field's not editable attribute. Unfortunately the TextItem (and others like SelectItem) allows editing - the FormItem behaves the right way.
Is it intentional ? Any suggestions ?
MichalG
					There are two fields in DataSource, both with canEdit property set to false.
The DynamicForm attached to this DataSource has corresponding items: one FormItem and one TextItem:
Code:
	
	    public void onModuleLoad() {
        DataSource ds = new DataSource();
        ds.setDataFormat(DSDataFormat.XML);
        ds.setDataURL("data.xml");
        ds.setRecordXPath("//country");
        DataSourceTextField pkField = new DataSourceTextField("countryCode");
        pkField.setPrimaryKey(true);
        pkField.setCanEdit(false);
        DataSourceTextField countryNameField = new DataSourceTextField("countryName");
        countryNameField.setCanEdit(false);
        ds.setFields(pkField, countryNameField);
        DynamicForm form = new DynamicForm();
        form.setDataSource(ds);
        FormItem pkItem = new FormItem("countryCode");
        TextItem countryNameItem = new TextItem("countryName");
        form.setFields(pkItem, countryNameItem);
        VLayout main = new VLayout();
        main.addMember(form);
        main.draw();
    }
Is it intentional ? Any suggestions ?
MichalG

Comment