I created a simple type to use in my application.
my custom type:
	creating form from datasource with as field that has our custom type:
	When i set the editor from inside my SimpleType, i get a runtime error (com.google.gwt.core.client.JavaScriptException: (TypeError): Object expected) when i add the form to the main canvas. Is this a bug or did i do something wrong?
I have the problem with SmartGWT 1.1 and SmartGWT 1.2 SNAPSHOT.
Setting the editor type from inside the datasource works ok but would like to do it from my type.
I also go an other related question:
I want to format the displayed value, in the SmartClient API I'm finding http://www.smartclient.com/docs/6.5.1/a/b/c/go.html#method..SimpleType.normalDisplayFormatter, but it seems that for SmartGWT I will have to work with maskvalidator. Is that true?
					my custom type:
Code:
	
	public class TestST extends SimpleType{
  public TestST(){
    this.setName("testType");
    this.setValidators(new IsIntegerValidator());
    //next line breaks the code
    this.setEditorType(new TextItem());
  }
}
Code:
	
	//following line is needed to find the type string
new TestST().create();
//datasource with one field that is set to our custom type
DataSource ds = new DataSource();
DataSourceField dsf = new DataSourceField();
dsf.setName("name");
dsf.setTitle("Title");
dsf.setAttribute("type", "testType"); // smartgwt does not have a method for this
ds.setFields(dsf);
//form generated from the DataSource
final DynamicForm df = new DynamicForm();
df.setDataSource(ds);
I have the problem with SmartGWT 1.1 and SmartGWT 1.2 SNAPSHOT.
Setting the editor type from inside the datasource works ok but would like to do it from my type.
I also go an other related question:
I want to format the displayed value, in the SmartClient API I'm finding http://www.smartclient.com/docs/6.5.1/a/b/c/go.html#method..SimpleType.normalDisplayFormatter, but it seems that for SmartGWT I will have to work with maskvalidator. Is that true?

Comment