Author: fdesbois Date: 2010-02-16 18:27:00 +0000 (Tue, 16 Feb 2010) New Revision: 358 Modified: trunk/changelog.txt trunk/wao-business/src/main/java/fr/ifremer/wao/WaoRunnerImpl.java trunk/wao-business/src/main/xmi/wao.zargo trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java Log: - Resolve issue on changing contact edition - Disable migration service for previous versions : will be enable from version 1.0 Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2010-02-16 16:16:27 UTC (rev 357) +++ trunk/changelog.txt 2010-02-16 18:27:00 UTC (rev 358) @@ -43,6 +43,13 @@ - [fdesbois] Ano #1992 : Session : Problème d'instanciation sur User lors de la perte de la session +Note technique + Pour une base de données existante il est nécessaire de faire un dump, de + modifier le fichier sql générer en remplaçant 'fr.ifremer.suiviobsmer' par + 'fr.ifremer.wao' et de recréer une nouvelle base avec le sql ainsi modifié. + Ceci permet de modifier l'ensemble des topiaId existants pour garder la + cohérence avec la version 1.0. + 0.4.1 ----- Modified: trunk/wao-business/src/main/java/fr/ifremer/wao/WaoRunnerImpl.java =================================================================== --- trunk/wao-business/src/main/java/fr/ifremer/wao/WaoRunnerImpl.java 2010-02-16 16:16:27 UTC (rev 357) +++ trunk/wao-business/src/main/java/fr/ifremer/wao/WaoRunnerImpl.java 2010-02-16 18:27:00 UTC (rev 358) @@ -57,11 +57,12 @@ WaoModelDAOHelper.getImplementationClassesAsString()); // migration configuration - configuration.setOption(ManualMigrationEngine.MIGRATION_APPLICATION_VERSION, WaoModelDAOHelper.getModelVersion()); - configuration.setOption(ManualMigrationEngine.MIGRATION_MAPPING_DIRECTORY, "oldmappings"); - configuration.setOption(ManualMigrationEngine.MIGRATION_MODEL_NAME, "WaoModel"); - configuration.setOption("topia.service.migration", ManualMigrationEngine.class.getName()); - configuration.setOption(ManualMigrationEngine.MIGRATION_CALLBACK, WaoMigrationCallBack.class.getName()); + // Temporarly unused before 1.0 version +// configuration.setOption(ManualMigrationEngine.MIGRATION_APPLICATION_VERSION, WaoModelDAOHelper.getModelVersion()); +// configuration.setOption(ManualMigrationEngine.MIGRATION_MAPPING_DIRECTORY, "oldmappings"); +// configuration.setOption(ManualMigrationEngine.MIGRATION_MODEL_NAME, "WaoModel"); +// configuration.setOption("topia.service.migration", ManualMigrationEngine.class.getName()); +// configuration.setOption(ManualMigrationEngine.MIGRATION_CALLBACK, WaoMigrationCallBack.class.getName()); configuration.printConfig(); Modified: trunk/wao-business/src/main/xmi/wao.zargo =================================================================== (Binary files differ) Modified: trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java =================================================================== --- trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java 2010-02-16 16:16:27 UTC (rev 357) +++ trunk/wao-ui/src/main/java/fr/ifremer/wao/ui/pages/Contacts.java 2010-02-16 18:27:00 UTC (rev 358) @@ -389,9 +389,12 @@ private String oldComment; public void prepareContactEdited(String contactId) throws WaoException { - if (contactEdited == null) { - contactEdited = getContacts().get(contactId); - } +// if (getContacts().contains(contactId)) { + // The contacts list result must contains this contactId because + // only actions from the page can access to the complete contacts + // list of the same page. + contactEdited = getContacts().get(contactId); +// } //contact = contactEdited; } @@ -422,6 +425,9 @@ void onSelectedFromAcceptContact(String contactId) throws WaoException { //contact = getContacts().get(contactId); + if (log.isDebugEnabled()) { + log.debug("Accept contact : " + contactId); + } prepareContactEdited(contactId); if (user.getAdmin()) { contactEdited.setValidationProgram(Boolean.TRUE); @@ -434,6 +440,9 @@ void onSelectedFromRefuseContact(String contactId) throws WaoException { //contact = getContacts().get(contactId); + if (log.isDebugEnabled()) { + log.debug("Refuse contact : " + contactId); + } prepareContactEdited(contactId); if (user.getAdmin()) { // For program refused, removeRealTideTime @@ -446,6 +455,9 @@ void onSelectedFromUnvalidateContact(String contactId) throws WaoException { //contact = getContacts().get(contactId); + if (log.isDebugEnabled()) { + log.debug("Unvalidate contact : " + contactId); + } prepareContactEdited(contactId); if (user.getAdmin()) { // For program unvalidate from previous refused validation, addRealTideTime @@ -465,6 +477,9 @@ void onSelectedFromEditContact(String contactId) throws WaoException { //contact = getContacts().get(contactId); + if (log.isDebugEnabled()) { + log.debug("Edit contact : " + contactId); + } prepareContactEdited(contactId); contactUserId = contactEdited.getObserver().getTopiaId(); //contactEditedId = contactId; @@ -475,12 +490,18 @@ void onSelectedFromDeleteContact(String contactId) throws WaoException { //contact = getContacts().get(contactId); + if (log.isDebugEnabled()) { + log.debug("Delete contact : " + contactId); + } prepareContactEdited(contactId); deleted = true; } void onSelectedFromSaveContact(String contactId) throws WaoException { //contact = getContacts().get(contactId); + if (log.isDebugEnabled()) { + log.debug("Save contact : " + contactId); + } prepareContactEdited(contactId); contactEdited.setState(contactState.toString()); WaoUser contactUser = getUserSelectModel().findObject(contactUserId);