ComboBoxItem buildings = new ComboBoxItem("buildings", "Building Names") {
        public Criteria getPickListFilterCriteria() {
            Criteria criteria = new Criteria();
            criteria.setAttribute("dependentString", grid.getSelectedRecord().getAttribute("company"));
            criteria.setAttribute("dependentString2", "office");
            return criteria;
        }
    };
    buildings.setOptionDataSource(CommonLookupDS.getLookupDS(LookupTypesClient.LOOKUP_BUILDINGS_BY_TYPE));
    buildings.setValueField("key");
    buildings.setDisplayField("value");
    buildings.setWidth(125);
    buildings.setWrapTitle(true);
    buildings.setAutoFetchData(false);
    buildings.setRequired(true);


一旦重写了getPickListFilterCriteria方法,此comboBox就会停止过滤用户输入。无论用户输入什么,它都会显示所有选项。
如何解决这个问题?

最佳答案

我将所有标准设置都放入了数据源,并且可以正常工作。所以,在方法transformRequest中

public Object transformRequest(DSRequest dsRequest){
    dsRequest.setHttpMethod("POST");
    return "<json>";
}

08-06 04:17