Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Exception when using setEditorType in DataSource

    Hi,

    I'm using fields from a DataSource for a DynamicForm but I want to use a TextAreaItem instead of a TextItem for a field. So I use the setEditorType method in the DataSource but it generates an exception:
    Code:
    Uncaught JavaScript exception [com.google.gwt.core.client.JavaScriptException: (TypeError): Object expected
     number: -2146823281
     description: Object expected
        at com.smartgwt.client.util.JSOHelper.setAttribute(Native Method)
        at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:319)
        at com.smartgwt.client.widgets.form.DynamicForm.fetchData(Native Method)
    Form
    Code:
    DynamicForm form = new DynamicForm();
    form.setDataSource(DataSchemaDS.getInstance());
    DataSource
    Code:
    public DataSchemaDS(String identifier) {
      setID(identifier);
      DataSourceTextField name = new DataSourceTextField("name", "Name");
      name.setPrimaryKey(true);
      name.setRequired(true);
      addField(name);
    
      DataSourceTextField description = new DataSourceTextField("description", "Description");
      description.setEditorType(new TextAreaItem());
      addField(description);
    }
    I'm using the latest SVN version.
    Any ideas ?

    Thanks
Working...
X