Be sure your post includes:
SmartGWTversion : v8.3p_2013-06-11/Pro Development
IE 7
5. if there is a JavaScript error, the stack trace logged in the Developer Console (see FAQ)
Stop running this script? A script on this page is causing Internet Explorer to run slowly. If it continue to run, your computer may become unresponsive.
I'm getting this error when loading a comboboxitem
ListGridField partNo = new ListGridField(FGCSugestBoxDTO.FGC_ID, FGCSugestBoxDTO.FGC_TITLE);
ListGridField partDescription = new ListGridField(FGCSugestBoxDTO.DESCRIPTION_ID, FGCSugestBoxDTO.DESCRIPTION_TITLE);
fgcPicklist = new FGCComboBox("fgc", "FGC");
fgcPicklist.setPickListFields(partNo, partDescription);
fgcPicklist.setRequired(true);
fgcPicklist.setValidators(new FgcValidator());
/*******************************************/
public static class FGCComboBox extends BaseComboBox {
public FGCComboBox(String name, String title)
{
this(name, title, FGCSugestBoxRestDataSource.getInstance(), FGCSugestBoxDTO.FGC_ID,
FGCSugestBoxDTO.FGC_ID);
}
public FGCComboBox(String name, String title, LinkedHashMap<String, String> map) {
super(name, title, map);
}
public FGCComboBox(String name, String title, DataSource dataSource, String valueField,
String displayField)
{
super(name, title, dataSource, valueField, displayField);
ListGridField fgcField = SmartGWTUtil.getListGridField(
FGCSugestBoxDTO.FGC_ID, null, false);
ListGridField fgcDescField = SmartGWTUtil.getListGridField(
FGCSugestBoxDTO.DESCRIPTION_ID, null, false);
setPickListFields(fgcField, fgcDescField);
setFilterFields(FGCSugestBoxDTO.FGC_ID);
setSortField(FGCSugestBoxDTO.FGC_ID);
}
}
/*******************************************/
public static class BaseComboBox extends ComboBoxItem
{
public BaseComboBox(String name, String title)
{
super(name, title);
setDefaultProperties();
}
public BaseComboBox(String name, String title, String... fixedValues)
{
super(name, title);
setValueMap(fixedValues);
setDefaultProperties();
}
public BaseComboBox(String name, String title, LinkedHashMap<String, String> fixedValues)
{
super(name, title);
setValueMap(fixedValues);
setDefaultProperties();
}
public BaseComboBox(DataSource optionDataSource, String valueField, String displayField)
{
super();
setOptionDataSource(optionDataSource);
setValueField(valueField);
setDisplayField(displayField);
setDefaultProperties();
}
public BaseComboBox(String name, String title, DataSource optionDataSource)
{
super(name, title);
setOptionDataSource(optionDataSource);
setDefaultProperties();
}
public BaseComboBox(String name, String title, DataSource optionDataSource, String valueField,
String displayField)
{
super(name, title);
setOptionDataSource(optionDataSource);
setValueField(valueField);
setDisplayField(displayField);
setDefaultProperties();
}
private void setDefaultProperties()
{
ListGrid defaultProperties = new ListGrid();
defaultProperties.setAutoFitWidthApproach(AutoFitW idthApproach.BOTH);
defaultProperties.setAutoFitFieldWidths(true);
defaultProperties.setFixedRecordHeights(false);
defaultProperties.setAlternateRecordStyles(true);
defaultProperties.setCanResizeFields(true);
defaultProperties.setCanEdit(false);
defaultProperties.setShowHeader(true);
defaultProperties.setOverflow(Overflow.AUTO);
// setAutoFetchData false for testing ??bug clearing all combo's on
// re-editing??
setAutoFetchData(true);
setPickListProperties(defaultProperties);
setPickListWidth(250);
setTextMatchStyle(TextMatchStyle.SUBSTRING);
setCompleteOnTab(true);
}
protected ListGrid getPickListProperties()
{
ListGrid defaultProperties = new ListGrid();
JavaScriptObject configJS = getAttributeAsJavaScriptObject("pickListProperties ");
defaultProperties.setConfig(configJS);
return defaultProperties;
}
}
SmartGWTversion : v8.3p_2013-06-11/Pro Development
IE 7
5. if there is a JavaScript error, the stack trace logged in the Developer Console (see FAQ)
Stop running this script? A script on this page is causing Internet Explorer to run slowly. If it continue to run, your computer may become unresponsive.
I'm getting this error when loading a comboboxitem
ListGridField partNo = new ListGridField(FGCSugestBoxDTO.FGC_ID, FGCSugestBoxDTO.FGC_TITLE);
ListGridField partDescription = new ListGridField(FGCSugestBoxDTO.DESCRIPTION_ID, FGCSugestBoxDTO.DESCRIPTION_TITLE);
fgcPicklist = new FGCComboBox("fgc", "FGC");
fgcPicklist.setPickListFields(partNo, partDescription);
fgcPicklist.setRequired(true);
fgcPicklist.setValidators(new FgcValidator());
/*******************************************/
public static class FGCComboBox extends BaseComboBox {
public FGCComboBox(String name, String title)
{
this(name, title, FGCSugestBoxRestDataSource.getInstance(), FGCSugestBoxDTO.FGC_ID,
FGCSugestBoxDTO.FGC_ID);
}
public FGCComboBox(String name, String title, LinkedHashMap<String, String> map) {
super(name, title, map);
}
public FGCComboBox(String name, String title, DataSource dataSource, String valueField,
String displayField)
{
super(name, title, dataSource, valueField, displayField);
ListGridField fgcField = SmartGWTUtil.getListGridField(
FGCSugestBoxDTO.FGC_ID, null, false);
ListGridField fgcDescField = SmartGWTUtil.getListGridField(
FGCSugestBoxDTO.DESCRIPTION_ID, null, false);
setPickListFields(fgcField, fgcDescField);
setFilterFields(FGCSugestBoxDTO.FGC_ID);
setSortField(FGCSugestBoxDTO.FGC_ID);
}
}
/*******************************************/
public static class BaseComboBox extends ComboBoxItem
{
public BaseComboBox(String name, String title)
{
super(name, title);
setDefaultProperties();
}
public BaseComboBox(String name, String title, String... fixedValues)
{
super(name, title);
setValueMap(fixedValues);
setDefaultProperties();
}
public BaseComboBox(String name, String title, LinkedHashMap<String, String> fixedValues)
{
super(name, title);
setValueMap(fixedValues);
setDefaultProperties();
}
public BaseComboBox(DataSource optionDataSource, String valueField, String displayField)
{
super();
setOptionDataSource(optionDataSource);
setValueField(valueField);
setDisplayField(displayField);
setDefaultProperties();
}
public BaseComboBox(String name, String title, DataSource optionDataSource)
{
super(name, title);
setOptionDataSource(optionDataSource);
setDefaultProperties();
}
public BaseComboBox(String name, String title, DataSource optionDataSource, String valueField,
String displayField)
{
super(name, title);
setOptionDataSource(optionDataSource);
setValueField(valueField);
setDisplayField(displayField);
setDefaultProperties();
}
private void setDefaultProperties()
{
ListGrid defaultProperties = new ListGrid();
defaultProperties.setAutoFitWidthApproach(AutoFitW idthApproach.BOTH);
defaultProperties.setAutoFitFieldWidths(true);
defaultProperties.setFixedRecordHeights(false);
defaultProperties.setAlternateRecordStyles(true);
defaultProperties.setCanResizeFields(true);
defaultProperties.setCanEdit(false);
defaultProperties.setShowHeader(true);
defaultProperties.setOverflow(Overflow.AUTO);
// setAutoFetchData false for testing ??bug clearing all combo's on
// re-editing??
setAutoFetchData(true);
setPickListProperties(defaultProperties);
setPickListWidth(250);
setTextMatchStyle(TextMatchStyle.SUBSTRING);
setCompleteOnTab(true);
}
protected ListGrid getPickListProperties()
{
ListGrid defaultProperties = new ListGrid();
JavaScriptObject configJS = getAttributeAsJavaScriptObject("pickListProperties ");
defaultProperties.setConfig(configJS);
return defaultProperties;
}
}