I have implemented a comboBox that is populated dynamically via an xml web service.
I type in the first few characters, the drop down populates a large list and I select my option. At this point, if I drop down the list again, there will only be one item in my list, for it fetched a result set with a single item this time, based on the direct match of the text entered.
At this point, if I try to alter the text (backspace, backspace, backspace), I notice that the keyPress events have ceased firing, and my list isn’t populating any more.
I imagine that I need to attack this problem differently, perhaps by setting other properties. Do you have any ideas?
Thanks,
Mark Varvil
<SCRIPT>
isc.DynamicForm.create({
fields:[
{ID:"ComboBoxItem0",
name:"ComboBoxItem0",
_constructor:"ComboBoxItem",
valueField: "Key",
displayField: "name",
optionDataSource: "testDS",
pickListHeight: 200,
showPickListOnKeypress:true,
fetchMissingValues:true,
filterWithValue:true,
showOptionsFromDataSource:true,
keyPress : function() {
Log.logWarn("keyPress()");
}
}
],
autoDraw:false,
ID:"DynamicForm0"
})
isc.VLayout.create({
members:[
DynamicForm0
],
autoDraw:true,
overflow:"hidden",
width:"100%",
ID:"VLayout0",
height:"100%"
})
isc.DataSource.create({
ID:"testDS",
dataURL:"/xxx/Partners.do?lookupType=name",
recordXPath:"/PartnerList/Organization",
autofetch:true,
dataFormat:"xml",
fields:[
{
primaryKey:true,
name:"Key",
valueXPath:"@OrganizationKey"
},
{
name:"name",
valueXPath:"@OrganizationName"
}
],
transformRequest : function (dsRequest) {
Log.logWarn("transformRequest beginning");
if (dsRequest.operationType == "fetch") {
Log.logWarn("transformRequest() fetch beginning");
Log.logWarn("transformRequest() ComboBoxItem0.getDisplayValue(): " + ComboBoxItem0.getDisplayValue());
var params = {
start : dsRequest.startRow,
end : dsRequest.endRow,
name: ComboBoxItem0.getDisplayValue()
};
return isc.addProperties({}, dsRequest.data, params);
}
},
transformResponse : function (dsResponse, dsRequest, xmlData) {
Log.logWarn("transformResponse() xmlData: " + Log.echoAll(xmlData));
Log.logWarn("");
Log.logWarn("transformResponse() dsResponse: " + Log.echoAll(dsResponse));
Log.logWarn("");
Log.logWarn("transformResponse() dsResponse.data: " + Log.echoAll(dsResponse.data));
dsResponse.totalRows = XMLTools.selectNumber(xmlData,"/PartnerList/@TotalCount");
}
});
</SCRIPT>