Author: chatellier Date: 2011-02-10 18:17:24 +0000 (Thu, 10 Feb 2011) New Revision: 735 Log: Fix data reloading Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2011-02-10 15:58:19 UTC (rev 734) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Project.java 2011-02-10 18:17:24 UTC (rev 735) @@ -34,6 +34,7 @@ import java.util.Properties; import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang.StringUtils; import fr.ifremer.coser.CoserUtils; import fr.ifremer.coser.storage.DataStorage; @@ -347,7 +348,7 @@ if (props.containsKey("project.strataFileName")) { setStrataFileName(props.getProperty("project.strataFileName")); } - if (props.containsKey("project.maps")) { + if (StringUtils.isNotBlank(props.getProperty("project.maps"))) { List<String> mapsAsString = CoserUtils.splitAsList(props.getProperty("project.maps")); List<File> maps = new ArrayList<File>(); for (String mapAsString : mapsAsString) { Modified: trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java =================================================================== --- trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java 2011-02-10 15:58:19 UTC (rev 734) +++ trunk/coser-business/src/main/java/fr/ifremer/coser/bean/Selection.java 2011-02-10 18:17:24 UTC (rev 735) @@ -332,13 +332,13 @@ if (props.containsKey("selection.description")) { setDescription(props.getProperty("selection.description")); } - if (props.containsKey("selection.allYears")) { + if (StringUtils.isNotBlank(props.getProperty("selection.allYears"))) { setAllYears(CoserUtils.splitAsList(props.getProperty("selection.allYears"))); } - if (props.containsKey("selection.selectedYears")) { - setSelectedYears(CoserUtils.splitAsList(props.getProperty("selection.allYears"))); + if (StringUtils.isNotBlank(props.getProperty("selection.selectedYears"))) { + setSelectedYears(CoserUtils.splitAsList(props.getProperty("selection.selectedYears"))); } - if (props.containsKey("selection.selectedStrata")) { + if (StringUtils.isNotBlank(props.getProperty("selection.selectedStrata"))) { setSelectedStrata(CoserUtils.splitAsList(props.getProperty("selection.selectedStrata"))); } if (props.containsKey("selection.comment")) { @@ -350,16 +350,16 @@ if (props.containsKey("selection.densityFilter")) { setDensityFilter(Double.parseDouble(props.getProperty("selection.densityFilter"))); } - if (props.containsKey("selection.selectedSpecies")) { + if (StringUtils.isNotBlank(props.getProperty("selection.selectedSpecies"))) { setSelectedSpecies(CoserUtils.splitAsList(props.getProperty("selection.selectedSpecies"))); } - if (props.containsKey("selection.selectedSpeciesOccDens")) { + if (StringUtils.isNotBlank(props.getProperty("selection.selectedSpeciesOccDens"))) { setSelectedSpeciesOccDens(CoserUtils.splitAsList(props.getProperty("selection.selectedSpeciesOccDens"))); } - if (props.containsKey("selection.selectedSpeciesSizeAllYear")) { + if (StringUtils.isNotBlank(props.getProperty("selection.selectedSpeciesSizeAllYear"))) { setSelectedSpeciesSizeAllYear(CoserUtils.splitAsList(props.getProperty("selection.selectedSpeciesSizeAllYear"))); } - if (props.containsKey("selection.selectedSpeciesMaturity")) { + if (StringUtils.isNotBlank(props.getProperty("selection.selectedSpeciesMaturity"))) { setSelectedSpeciesMaturity(CoserUtils.splitAsList(props.getProperty("selection.selectedSpeciesMaturity"))); } if (props.containsKey("selection.selectedSpeciesComment")) {