From: rkv Date: Mon, 11 Mar 2013 06:11:58 +0000 (+0000) Subject: Knowledge search initialization is fixed. X-Git-Tag: Root_Delivery2_2013_04_22~117 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef1d4a7cf7ba3464adc851ec70585ddbd1a33302;p=tools%2Fsiman.git Knowledge search initialization is fixed. --- diff --git a/Workspace/Siman/src/org/splat/simer/SearchKnowledgeAction.java b/Workspace/Siman/src/org/splat/simer/SearchKnowledgeAction.java index d8c83c1..8222dc2 100644 --- a/Workspace/Siman/src/org/splat/simer/SearchKnowledgeAction.java +++ b/Workspace/Siman/src/org/splat/simer/SearchKnowledgeAction.java @@ -52,16 +52,18 @@ public class SearchKnowledgeAction extends 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);