Constants.OPEN);
String res = SUCCESS;
+ // Final initialization of the form
+ _knowledgeTypes = buildKnowledgeTypesOptions();
+ setCandidates(); // not selected by default
+ setContextTypeOptions(getInvolvedContexts()); // not selected by default
+ loadFilter();
+ // Select the first knowledge type by default
+ Long ktypeId = getKnowledgeTypes().keySet().iterator().next();
+ if (ktypeId != null) {
+ getFilter().setKtype(String.valueOf(ktypeId));
+ }
try {
- loadFilter();
doSearch();
-
- // Final initialization of the form
- _knowledgeTypes = buildKnowledgeTypesOptions();
- getKnowledgeElementTypeService().selectTypesWhere(
- ProgressState.APPROVED);
- setCandidates();
- setContextTypeOptions(getInvolvedContexts());
} catch (Exception error) {
// No need to roll back the transaction as it is read only
LOG.error("Reason: ", error);