We are using Smart GWT 2.5 (power edition) and are facing an issue with a ComboBoxItem.
The ComboBoxItem is bound to a DataSource and is placed within a Window widget. The problem is that the data for the PickList is not always re-fetched: If a user logs out from the application (which destroys the Window with the ComboBoxItem) and another user logs in (creating a new Window), there is no re-fetch. Instead the ComboBoxItem's pick list shows the old values. So, although autoFetchData is set to false, there is not always a fetch operation performed, when the pick list is first opened.
ComboBoxItem configuration:
DataSource definition
DSRequest (is not always performed)
The ComboBoxItem is bound to a DataSource and is placed within a Window widget. The problem is that the data for the PickList is not always re-fetched: If a user logs out from the application (which destroys the Window with the ComboBoxItem) and another user logs in (creating a new Window), there is no re-fetch. Instead the ComboBoxItem's pick list shows the old values. So, although autoFetchData is set to false, there is not always a fetch operation performed, when the pick list is first opened.
ComboBoxItem configuration:
Code:
logSymId = new StyledComboBoxItem(Consts.F_LOG_SYM_ID);
logSymId.setTitle("System");
logSymId.setOptionDataSource(DataSource
.get(Consts.DS_AM_LOGIN_CREATE_SYSTEM));
logSymId.setValueField(Consts.F_SYM_ID);
logSymId.setDisplayField(Consts.F_SYM_NAME);
logSymId.setSortField(Consts.F_SYM_NAME);
logSymId.setSelectOnFocus(true);
logSymId.setAutoFetchData(false);
logSymId.setTextMatchStyle(TextMatchStyle.STARTS_WITH);
logSymId.setRequired(true);
logSymId.setAddUnknownValues(false);
logSymId.setWidth(255);
logSymId.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
onChangedLogSymId();
}
});
Code:
<?xml version="1.0" encoding="UTF-8"?> <DataSource ID="am_login_create_system" serverType="sql" tableName="sdm$vi_web_system" cacheAllData="false"> <fields> <field name="sym_id" type="integer" required="true" primaryKey="true" /> <field name="sym_name" type="text" required="true" length="200" /> <fiele name="sym_sty_id" type="integer" required="true" /> </fields> <serverObject lookupStyle="new" className="de.tmobile.sdom.frontend.server.dmi.ReadOnlyBaseDMI" /> <operationBindings> <operationBinding operationType="fetch"> <tableClause>sdm$vi_web_system inner join (select distinct lot_sym_id, ltp_lpt_id from sdm$vi_web_curuser_log_type_pr inner join sdm$vi_web_login_type on ltp_lot_id=lot_id) on sym_id = lot_sym_id</tableClause> <whereClause>ltp_lpt_id = 1 and ($defaultWhereClause) </whereClause> </operationBinding> </operationBindings> </DataSource>
DSRequest (is not always performed)
Code:
{
"dataSource":"am_login_create_system",
"operationType":"fetch",
"data":null,
"resultSet":[ResultSet ID:isc_ResultSet_7 (created by: undefined)],
"callback":{
"caller":[ResultSet ID:isc_ResultSet_7 (created by: undefined)],
"methodName":"fetchRemoteDataReply"
},
"willHandleError":true,
"showPrompt":true,
"oldValues":null,
"clientContext":{
"requestIndex":1
},
"requestId":"am_login_create_system$62719"
}
Comment