Hi Isomorphic
I am getting problem with setEditorProperties using for selectItemItem on form and saving to listgrid after upgraded to smartgwt 12.0. Previously we used used setEditortype for selectItem on dynamic form. But now it is deprecated I am using setEditorProperties for selectItem to set fields into list grid.
I have list grid and some conrols on form. When I click on Add Criteria, it will open one dynamic form having 3 dropdowns. If we select one dropdow, depends on the value selected in first dropdown second dropdown will open. User has to select value from second dropdown. Next based on these dropdown selects another dropdown display values. User has to select value from third dropdown and click save. It will go and save into listGrid. This is work fine. when user select one row on listgrid it should open form it should display 3 dropdowns. First 2 dropdowns should be disabled 3dropdown should be enable. This is working fine until smartgwt 6.0. But after upgraded to smartgwt 12.0 I used setEditorProperties instead of setEditorType for third dropdown. So when I select row on the grid I couldn't see third dropdown in enable position.
This is the code I used for creating dropdown
filterValueSelectItem = new SelectItem();
filterValueSelectItem.setAutoFetchData(false);
filterValueSelectItem.setOptionDataSource(DonationDataSourceFactory.getInstance(DonationDataSource.AllocationTypeDS));
filterValueSelectItem.setValueField(TypeDataSourceBase.KEY);
filterValueSelectItem.setDisplayField(TypeDataSourceBase.VALUE);
filterValueSelectItem.setValueMap(emptyMap);
private void createFilterValueField(final DataSource ds) {
filterValueField = DonationFormItemFactory.getFormItem(ds, DonTotalFilterDS.FILTERVALUE);
filterValueField.setValueField(TypeDataSourceBase.KEY);
filterValueField.setDisplayField(TypeDataSourceBase.VALUE);
filterValueField.setWidth(FIELD_WIDTH);
filterValueField.setRequired(true);
filterValueField.setEditorType(filterValueSelectItem);
filterValueField.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
setFilterTypeCriteria(filterTypeCode);
}
});
filterValueField.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
if(!(event.getValue() instanceof Integer)){
inOperatorList = (String[])event.getValue();
filterValueList = inOperatorList;
}
}
});
}
To get values from third dropdown for value map I am using below code
protected void setfilterValueMultipleField(SelectItem selectItemType) {
filterValueField.setAttribute("value", filterValueList);
selectItemType.setValues(filterValueList);
//filterValueField.setEditorType(selectItemType);
//filterValueField.setEditorType(selectItemType);
filterValueField.setEditorProperties(selectItemType);
}
protected void setfilterValueField(SelectItem selectItemType) {
// if changed from multiple to non-multiple, clear out filterValueString if it contains a comma
if (filterValueString != null && filterValueString.contains(",")) {
filterValueField.clearValue();
filterValueList = null;
} else {
selectItemType.setValue(filterValueString);
}
//filterValueField.setEditorType(selectItemType);
filterValueField.setEditorProperties(selectItemType);
}
This is the code I am using in listgrid for third dropdown
ListGridField filterValueField = new ListGridField("filterValue");
filterValueField.setTitle(BaseConstants.guiConstants.criteriaTitle());
filterValueField.setWidth("30%");
filterValueField.setAlign(Alignment.LEFT);
filterValueField.setCanEdit(false);
filterValueField.setDisplayField("filterDescription");
filterValueField.setValueField("filterValue");
ListGridField filterDescriptionField = new ListGridField("filterDescription");
filterDescriptionField.setHidden(true);
totalFilterGrid.addRecordClickHandler(new RecordClickHandler() {
@Override
public void onRecordClick(final RecordClickEvent event) {
if (!event.getField().getName().equals("remove")) {
Record record = event.getRecord();
editFilterRecord(donTotalTypeForm, record, false);
}
}
});
totalFilterGrid.setFields(donTotalFilterType, donTotalOperationType, filterValueField, removeField, donTotalInstructionType,
donTotalColumnType, filterDescriptionField);
//totalFilterGrid.fetchData();
return totalFilterGrid;
}
private void editFilterRecord(final DynamicForm donTotalTypeForm, final Record record, final Boolean isAddRecord) {
new DonTotalFilterPopup(DonTotalTypePopup.this, donTotalTypeForm, record,
donTotalOperationTypeCodeMap, isAddRecord);
}
I have boolean, it is true we can add new criteria and if it is false when click on list grid record the same form should show 3 popups. 3rd popup should be enable. This is not enabling after upgraded 12.0 and used setEditorPropeties for third popup. The same code is working fine with smartgwt 6.0 even with setEditorPropeties
The code is working fine until 6.0 version, after upgraded to 12.0, this is not working.
please help me on this.
Thank you
Rama
I am getting problem with setEditorProperties using for selectItemItem on form and saving to listgrid after upgraded to smartgwt 12.0. Previously we used used setEditortype for selectItem on dynamic form. But now it is deprecated I am using setEditorProperties for selectItem to set fields into list grid.
I have list grid and some conrols on form. When I click on Add Criteria, it will open one dynamic form having 3 dropdowns. If we select one dropdow, depends on the value selected in first dropdown second dropdown will open. User has to select value from second dropdown. Next based on these dropdown selects another dropdown display values. User has to select value from third dropdown and click save. It will go and save into listGrid. This is work fine. when user select one row on listgrid it should open form it should display 3 dropdowns. First 2 dropdowns should be disabled 3dropdown should be enable. This is working fine until smartgwt 6.0. But after upgraded to smartgwt 12.0 I used setEditorProperties instead of setEditorType for third dropdown. So when I select row on the grid I couldn't see third dropdown in enable position.
This is the code I used for creating dropdown
filterValueSelectItem = new SelectItem();
filterValueSelectItem.setAutoFetchData(false);
filterValueSelectItem.setOptionDataSource(DonationDataSourceFactory.getInstance(DonationDataSource.AllocationTypeDS));
filterValueSelectItem.setValueField(TypeDataSourceBase.KEY);
filterValueSelectItem.setDisplayField(TypeDataSourceBase.VALUE);
filterValueSelectItem.setValueMap(emptyMap);
private void createFilterValueField(final DataSource ds) {
filterValueField = DonationFormItemFactory.getFormItem(ds, DonTotalFilterDS.FILTERVALUE);
filterValueField.setValueField(TypeDataSourceBase.KEY);
filterValueField.setDisplayField(TypeDataSourceBase.VALUE);
filterValueField.setWidth(FIELD_WIDTH);
filterValueField.setRequired(true);
filterValueField.setEditorType(filterValueSelectItem);
filterValueField.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
setFilterTypeCriteria(filterTypeCode);
}
});
filterValueField.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
if(!(event.getValue() instanceof Integer)){
inOperatorList = (String[])event.getValue();
filterValueList = inOperatorList;
}
}
});
}
To get values from third dropdown for value map I am using below code
protected void setfilterValueMultipleField(SelectItem selectItemType) {
filterValueField.setAttribute("value", filterValueList);
selectItemType.setValues(filterValueList);
//filterValueField.setEditorType(selectItemType);
//filterValueField.setEditorType(selectItemType);
filterValueField.setEditorProperties(selectItemType);
}
protected void setfilterValueField(SelectItem selectItemType) {
// if changed from multiple to non-multiple, clear out filterValueString if it contains a comma
if (filterValueString != null && filterValueString.contains(",")) {
filterValueField.clearValue();
filterValueList = null;
} else {
selectItemType.setValue(filterValueString);
}
//filterValueField.setEditorType(selectItemType);
filterValueField.setEditorProperties(selectItemType);
}
This is the code I am using in listgrid for third dropdown
ListGridField filterValueField = new ListGridField("filterValue");
filterValueField.setTitle(BaseConstants.guiConstants.criteriaTitle());
filterValueField.setWidth("30%");
filterValueField.setAlign(Alignment.LEFT);
filterValueField.setCanEdit(false);
filterValueField.setDisplayField("filterDescription");
filterValueField.setValueField("filterValue");
ListGridField filterDescriptionField = new ListGridField("filterDescription");
filterDescriptionField.setHidden(true);
totalFilterGrid.addRecordClickHandler(new RecordClickHandler() {
@Override
public void onRecordClick(final RecordClickEvent event) {
if (!event.getField().getName().equals("remove")) {
Record record = event.getRecord();
editFilterRecord(donTotalTypeForm, record, false);
}
}
});
totalFilterGrid.setFields(donTotalFilterType, donTotalOperationType, filterValueField, removeField, donTotalInstructionType,
donTotalColumnType, filterDescriptionField);
//totalFilterGrid.fetchData();
return totalFilterGrid;
}
private void editFilterRecord(final DynamicForm donTotalTypeForm, final Record record, final Boolean isAddRecord) {
new DonTotalFilterPopup(DonTotalTypePopup.this, donTotalTypeForm, record,
donTotalOperationTypeCodeMap, isAddRecord);
}
I have boolean, it is true we can add new criteria and if it is false when click on list grid record the same form should show 3 popups. 3rd popup should be enable. This is not enabling after upgraded 12.0 and used setEditorPropeties for third popup. The same code is working fine with smartgwt 6.0 even with setEditorPropeties
The code is working fine until 6.0 version, after upgraded to 12.0, this is not working.
please help me on this.
Thank you
Rama
Comment