diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java index 85cc5d96abee7dd627cc96c8b60f382f1714eead..e382e9241fc7cdb55d34eef523d849d111b3181c 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java @@ -263,19 +263,19 @@ public abstract class Dict // // ExternalData Viewer // - + public static final String LOCATION = "location"; - + public static final String FILE_FORMAT_TYPE = "file_format_type"; - + public static final String PROCEDURE_TYPE = "procedure_type"; - + public static final String EXTERNAL_DATA_SAMPLE = "external_data_sample"; - + public static final String IS_DERIVED = "is_derived"; - + public static final String IS_COMPLETE = "is_complete"; - + public static final String PRODUCTION_DATE = "production_date"; // @@ -335,6 +335,8 @@ public abstract class Dict public static final String SAMPLES = "samples"; + public static final String SAMPLES_LIST = "samples_list"; + // // Unclassified // diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionWidget.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionWidget.java index d98c2bc16a70ebf9bad754013589e187aff4756f..eba4cef5d19e04ed37c772ce3d242f21a13c4344 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionWidget.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/experiment/ProjectSelectionWidget.java @@ -52,7 +52,6 @@ public final class ProjectSelectionWidget extends ComboBox<ProjectModel> setEmptyText(viewContext.getMessage(Dict.COMBO_BOX_EMPTY, "projects")); setDisplayField(ModelDataPropertyNames.PROJECT_WITH_GROUP); setEditable(false); - setEnabled(false); setWidth(200); setFieldLabel(viewContext.getMessage(Dict.PROJECT)); setStore(new ListStore<ProjectModel>()); @@ -99,11 +98,11 @@ public final class ProjectSelectionWidget extends ComboBox<ProjectModel> projectStore.add(ProjectModel.convert(result)); if (projectStore.getCount() > 0) { - setEnabled(true); setValue(projectStore.getAt(0)); setEmptyText(viewContext.getMessage(Dict.COMBO_BOX_CHOOSE, "project")); } fireEvent(AppEvents.CALLBACK_FINISHED); } } + } \ No newline at end of file diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java index 7ce1c61e36613bceef65ea81f3d54a7e496b5cba..ee1af2dfddabee31aa830aa801fcb43e62a8d186 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/business/bo/SampleBO.java @@ -131,7 +131,6 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam checkSampleInGroup(sample); checkSampleUnused(sample, procedure); checkSampleWithoutDatasets(); - sample.getProcedures().add(procedure); getSampleDAO().updateSample(sample); dataChanged = false; @@ -162,7 +161,7 @@ public final class SampleBO extends AbstractSampleBusinessObject implements ISam final ProcedurePE procedureCreated) { final ProcedurePE procedure = sample.getValidProcedure(); - if (procedure != null && procedure.equals(procedureCreated) == false) + if (procedure != null) { throw UserFailureException.fromTemplate( "Given sample code '%s' already registered for experiment '%s'.", sample diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentRegistrationForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentRegistrationForm.java index 2b252d1bc19f3f55b3e5f0da57b5f854e8b10158..412ced2171f69e38c038ac14981a28ff52a700f1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentRegistrationForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/plugin/generic/client/web/client/application/experiment/GenericExperimentRegistrationForm.java @@ -99,7 +99,7 @@ public final class GenericExperimentRegistrationForm String text = samplesArea.getValue(); if (StringUtils.isBlank(text) == false) { - return text.split("\n|\r\n"); + return text.split("\n|\r\n|,"); } else { return new String[0]; @@ -158,6 +158,7 @@ public final class GenericExperimentRegistrationForm samplesArea = new TextArea(); samplesArea.setFieldLabel(viewContext.getMessage(Dict.SAMPLES)); samplesArea.setHeight("10em"); + samplesArea.setEmptyText(viewContext.getMessage(Dict.SAMPLES_LIST)); samplesArea.setId(ID + ID_SUFFIX_SAMPLES); for (int i = 0; i < DEFAULT_NUMBER_OF_ATTACHMENTS; i++) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js index a488a528db0f2f7f7e8272c406eb8e7aa96604fe..8ce77cd56c7656512e4b46b8bac4392afddb29eb 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js @@ -173,6 +173,7 @@ var common = { // experiment_registration: "Experiment Registration", samples: "Samples", + samples_list: "List of samples (codes or identifiers) separated by commas (\",\") or one sample per line.", // LAST LINE: KEEP IT AT THE END lastline: "" // we need a line without a comma