Hi,
In the example below i set an editor type on a datasource field. And create a form with a "special" formitem to render that datasource field. I would expect to see SmartGwt use the specified FormItem but instead it chooses the EditorType.
Thanks,
Ruben
Code:
	DataSource:
	
		
							
						
					In the example below i set an editor type on a datasource field. And create a form with a "special" formitem to render that datasource field. I would expect to see SmartGwt use the specified FormItem but instead it chooses the EditorType.
Thanks,
Ruben
Code:
Code:
	
	package test.client;
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.data.DataSourceField;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.TextAreaItem;
import com.smartgwt.client.widgets.form.fields.TextItem;
public class EditorTypeTest implements EntryPoint {
	
	public void onModuleLoad() {
		DataSource ds = DataSource.get("Customer");
		DataSourceField dsField = ds.getField("cstm_name");
		TextAreaItem textAreaItem = new TextAreaItem("cstm_name", "cstm_name");
		textAreaItem.setValue("I am a textarea");
		dsField.setEditorType(textAreaItem);
		
		DynamicForm form = new DynamicForm();
		form.setDataSource(ds);
		TextItem formItem = new TextItem("cstm_name", "cstm_name");
		form.setFields(formItem);
		form.draw();
	}
}
Code:
	
	<DataSource serverType="sql" dbName="Mysql" tableName="Customer" ID="Customer" > <fields> <field primaryKey="true" type="sequence" name="cstm_pk" hidden="true"></field> <field type="integer" length="10" name="cstm_number" title="" required="true" export="true"></field> <field type="text" length="45" name="cstm_name" title="" required="true" export="true"></field> <field type="text" length="4000" name="cstm_description" title="" export="true"></field> <field type="text" length="100" name="cstm_address" title="" export="true"></field> <field type="text" length="45" name="cstm_city" title="" export="true"></field> <field type="text" length="10" name="cstm_zip" title="" export="true"></field> <field type="text" length="45" name="cstm_country" title="" export="true"></field> <field type="text" length="100" name="cstm_email" title="" export="true"></field> <field type="text" length="45" name="cstm_createdBy" canEdit="false" title="" export="true"></field> <field type="text" length="45" name="cstm_modifiedBy" canEdit="false" title="" export="true"></field> <field type="datetime" name="cstm_createdOn" canEdit="false" title="" export="true"></field> <field type="datetime" name="cstm_modifiedOn" canEdit="false" title="" export="true"></field> </fields> </DataSource>

Comment