SmartGWT 2.4
GWT 2.1
Firefox 3.6.15
Win XP
Hi,
I am defining a custom FormItem and it does not seem to be working for me. I create a DataSource and assign the fully qualified name of the class to the DataSourceField.setEditorType. I have also tried instantiating an instance of the class and assigning that. The target grid displays fine but I get the following error when attempting to edit the row:
Uncaught JavaScript exception [_4[i] is undefined] in http://127.0.0.1:8888/trackmysports/sc/modules/ISC_Forms.js, line 325
which is almost certainly caused by the following message that occurred earlier:
com.smartgwt.client.core.JsObject$SGWT_WARN: 14:30:43.582:TMR8:WARN:DynamicForm:isc_DynamicForm_6:Problem initializing item: {<snip>} - derived FormItem class is: com.trackmysports.client.util.ElapsedTimeItem. Please make sure the relevant module is loaded
Is there some registration that I need to do that I missed? The cut down version of the FormItem is shown below. The real one will actually have a reason to be a sub-class but I am just trying to get it to work at all at the moment.
Thanks,
John
GWT 2.1
Firefox 3.6.15
Win XP
Hi,
I am defining a custom FormItem and it does not seem to be working for me. I create a DataSource and assign the fully qualified name of the class to the DataSourceField.setEditorType. I have also tried instantiating an instance of the class and assigning that. The target grid displays fine but I get the following error when attempting to edit the row:
Uncaught JavaScript exception [_4[i] is undefined] in http://127.0.0.1:8888/trackmysports/sc/modules/ISC_Forms.js, line 325
which is almost certainly caused by the following message that occurred earlier:
com.smartgwt.client.core.JsObject$SGWT_WARN: 14:30:43.582:TMR8:WARN:DynamicForm:isc_DynamicForm_6:Problem initializing item: {<snip>} - derived FormItem class is: com.trackmysports.client.util.ElapsedTimeItem. Please make sure the relevant module is loaded
Is there some registration that I need to do that I missed? The cut down version of the FormItem is shown below. The real one will actually have a reason to be a sub-class but I am just trying to get it to work at all at the moment.
Thanks,
John
Code:
package com.trackmysports.client.util;
import com.google.gwt.core.client.JavaScriptObject;
import com.smartgwt.client.widgets.form.fields.TextItem;
public class ElapsedTimeItem extends TextItem {
public static ElapsedTimeFormItemValueFormatter formatter = new ElapsedTimeFormItemValueFormatter();
public static ElapsedTimeFormItemValueParser parser = new ElapsedTimeFormItemValueParser();
public ElapsedTimeItem() {
super();
init();
}
public ElapsedTimeItem(JavaScriptObject jso) {
super(jso);
init();
}
public ElapsedTimeItem(String name) {
super(name);
init();
}
public ElapsedTimeItem(String name, String title) {
super(name, title);
init();
}
private void init() {
setAttribute("editorType", "com.trackmysports.client.util.ElapsedTimeItem");
setEditorValueFormatter(formatter);
setEditorValueParser(parser);
}
}
Comment