From a40ea8a4b935c9fa90db9c4c1c32720eb27ff474 Mon Sep 17 00:00:00 2001 From: rkv Date: Fri, 12 Oct 2012 04:47:38 +0000 Subject: [PATCH] Fixed: adding a knowledge element (but there is still a double addition), opening a study after closing a previously viewed one, study and scenario config - actions inheritance is fixed in applicationContext.xml. --- Workspace/Siman-Common/.springBeans | 4 +- .../splat/service/ScenarioServiceImpl.java | 2 + .../{daoServiceContext.xml => daoContext.xml} | 0 Workspace/Siman/.springBeans | 1 - Workspace/Siman/conf/templates/log4j.xml | 5 ++ Workspace/Siman/src/hibernate.properties | 2 +- Workspace/Siman/src/jdbc.properties | 2 +- .../Siman/src/org/splat/simer/Action.java | 2 +- .../splat/simer/DisplayStudyStepAction.java | 5 ++ .../Siman/src/spring/applicationContext.xml | 89 ++++++++++--------- 10 files changed, 64 insertions(+), 48 deletions(-) rename Workspace/Siman-Common/src/spring/{daoServiceContext.xml => daoContext.xml} (100%) diff --git a/Workspace/Siman-Common/.springBeans b/Workspace/Siman-Common/.springBeans index c18ad0a..832a43d 100644 --- a/Workspace/Siman-Common/.springBeans +++ b/Workspace/Siman-Common/.springBeans @@ -6,8 +6,8 @@ src/spring/globalContext.xml src/spring/businessServiceContext.xml - src/spring/daoServiceContext.xml src/spring/technicalServiceContext.xml + src/spring/daoContext.xml @@ -17,8 +17,8 @@ src/spring/globalContext.xml src/spring/businessServiceContext.xml - src/spring/daoServiceContext.xml src/spring/technicalServiceContext.xml + src/spring/daoContext.xml diff --git a/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java b/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java index 8cf54cd..0b6ba12 100644 --- a/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java +++ b/Workspace/Siman-Common/src/org/splat/service/ScenarioServiceImpl.java @@ -104,8 +104,10 @@ public class ScenarioServiceImpl implements ScenarioService { Transaction transax = session.getTransaction(); try { session.save(kelm); + session.flush(); //RKV // Update of my persistent data aScenario.getKnowledgeElements().add(kelm); + session.merge(aScenario); //RKV // Update of my transient data List known = aScenario .getKnowledgeElementsOf(kelm.getType()); // Initializes this.known, if not yet done diff --git a/Workspace/Siman-Common/src/spring/daoServiceContext.xml b/Workspace/Siman-Common/src/spring/daoContext.xml similarity index 100% rename from Workspace/Siman-Common/src/spring/daoServiceContext.xml rename to Workspace/Siman-Common/src/spring/daoContext.xml diff --git a/Workspace/Siman/.springBeans b/Workspace/Siman/.springBeans index ef7a1b3..9cb669e 100644 --- a/Workspace/Siman/.springBeans +++ b/Workspace/Siman/.springBeans @@ -13,7 +13,6 @@ false /Siman-Common/src/spring/businessServiceContext.xml - /Siman-Common/src/spring/daoServiceContext.xml /Siman-Common/src/spring/globalContext.xml /Siman-Common/src/spring/technicalServiceContext.xml src/spring/applicationContext.xml diff --git a/Workspace/Siman/conf/templates/log4j.xml b/Workspace/Siman/conf/templates/log4j.xml index d3a7190..10d1dcb 100644 --- a/Workspace/Siman/conf/templates/log4j.xml +++ b/Workspace/Siman/conf/templates/log4j.xml @@ -31,6 +31,10 @@ + + + + @@ -54,6 +58,7 @@ + diff --git a/Workspace/Siman/src/hibernate.properties b/Workspace/Siman/src/hibernate.properties index 46b0718..94db428 100644 --- a/Workspace/Siman/src/hibernate.properties +++ b/Workspace/Siman/src/hibernate.properties @@ -1,4 +1,4 @@ -# Generated at 11/10/2012 11:33:51 +# Generated at 12/10/2012 07:20:45 # Don't edit manually. See the source in D:\users\rkv\SIMAN\SIMAN_SRC\Workspace\Siman\conf\templates. # Connection properties connection.driver_class=com.mysql.jdbc.Driver diff --git a/Workspace/Siman/src/jdbc.properties b/Workspace/Siman/src/jdbc.properties index 6720228..aeb70cc 100644 --- a/Workspace/Siman/src/jdbc.properties +++ b/Workspace/Siman/src/jdbc.properties @@ -1,4 +1,4 @@ -# Generated at 11/10/2012 11:33:51 +# Generated at 12/10/2012 07:20:45 # Don't edit manually. See the source in D:\users\rkv\SIMAN\SIMAN_SRC\Workspace\Siman\conf\templates. # Connection properties connection.url=jdbc:mysql://localhost/simer diff --git a/Workspace/Siman/src/org/splat/simer/Action.java b/Workspace/Siman/src/org/splat/simer/Action.java index c092693..1606a89 100644 --- a/Workspace/Siman/src/org/splat/simer/Action.java +++ b/Workspace/Siman/src/org/splat/simer/Action.java @@ -105,7 +105,7 @@ public class Action extends ActionSupport implements SessionAware { _openKnowledge = kelm; } protected OpenKnowledge getOpenKnowledge () { - _openKnowledge = (OpenKnowledge)session.get("knowledge.open"); // May be null +// _openKnowledge = (OpenKnowledge)session.get("knowledge.open"); // May be null return _openKnowledge; } public void setOpenStudy (OpenStudy aStudy) { diff --git a/Workspace/Siman/src/org/splat/simer/DisplayStudyStepAction.java b/Workspace/Siman/src/org/splat/simer/DisplayStudyStepAction.java index 56f5795..c94b236 100644 --- a/Workspace/Siman/src/org/splat/simer/DisplayStudyStepAction.java +++ b/Workspace/Siman/src/org/splat/simer/DisplayStudyStepAction.java @@ -38,6 +38,11 @@ public class DisplayStudyStepAction extends DisplayBaseAction { if (mystudy != null && mystudy.getStudyObject() != null && mystudy.getIndex() == index) { // - The selected study is currently open selection = mystudy.getSelection(); // Current selection study = mystudy.getStudyObject(); // Current Study object + //RKV:BEGIN: put in session if necessary + if (!getSession().containsKey("study.open")) { + open(study); + } + //RKV:END } else { // - The selected study is new study = getStudyService().selectStudy(index); mystudy = open(study); diff --git a/Workspace/Siman/src/spring/applicationContext.xml b/Workspace/Siman/src/spring/applicationContext.xml index c7b78a9..6ca12a4 100644 --- a/Workspace/Siman/src/spring/applicationContext.xml +++ b/Workspace/Siman/src/spring/applicationContext.xml @@ -26,7 +26,7 @@ http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> + scope="session"> @@ -38,17 +38,60 @@ http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -81,22 +124,12 @@ http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> class="org.splat.simer.SearchDocumentAction" scope="prototype"> - - - - - - - - - - - - - - - - - - @@ -137,19 +155,6 @@ http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> - - - - - - - - - -- 2.39.2