Hello dear developers
I noticed that calling fetchData in SelectItem does not call DSCallback, although data is loaded from the server.
What did I miss or do wrong?
I noticed that calling fetchData in SelectItem does not call DSCallback, although data is loaded from the server.
Code:
DynamicForm selectForm = new DynamicForm(); selectForm.setWidth("100%"); ListGridField titleField = new ListGridField(CONSTANT.TITLE); JavaScriptObject object = JavaScriptObject.createObject(); JSOHelper.setAttribute(object, "fireItemClickForFolders", true); TreeGrid courseListProperties = new TreeGrid(object); courseListProperties.setKeepParentsOnFilter(true); selectedCourse = new SelectItem(); selectedCourse.setName("selectedCourse"); selectedCourse.setWidth(350); selectedCourse.setPickListWidth(400); selectedCourse.setHoverWidth(400); selectedCourse.setDataSetType("tree"); selectedCourse.setPickListProperties(courseListProperties); selectedCourse.setShowTitle(false); selectedCourse.setValueField(CONSTANT._ID); selectedCourse.setDisplayField(CONSTANT.TITLE); selectedCourse.setPickListFields(titleField); selectedCourse.setMultiple(false); selectedCourse.setAllowEmptyValue(false); selectedCourse.setAddUnknownValues(false); selectedCourse.setAutoFetchData(false); selectedCourse.setOptionDataSource(projectTreeData); selectedCourse.setPickListCriteria(courseFilter); selectedCourse.setAutoOpenTree("all"); selectedCourse.setEmptyDisplayValue(Server.getModuleString("emptyCourseItem")); selectForm.setItems(selectedCourse); addMembers(selectForm); selectedCourse.fetchData(new DSCallback() { @Override public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) { setProjectTreeNodes(dsResponse); selectFirstCourse(); }; });
Comment