diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentForm.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentForm.java index 6d7e09e0a8c81d4faf00689ff9bab5c44069c425..c5e0a0625588b05ef41142d1365f39c361c18707 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentForm.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/PropertyTypeAssignmentForm.java @@ -388,6 +388,16 @@ public final class PropertyTypeAssignmentForm extends LayoutContainer implements } } + /** + * Replaces '.' which has special meaning in GXT (but can occur in our property type codes) with + * a '*' which should not occur in our property field codes in other cases as it is not a valid + * code char. + */ + public static String replaceSpecialPropertyFieldIdChars(String propertyTypeCode) + { + return propertyTypeCode.replace('.', '*'); + } + private void updatePropertyTypeRelatedFields() { hidePropertyTypeRelatedFields(); @@ -396,7 +406,7 @@ public final class PropertyTypeAssignmentForm extends LayoutContainer implements { String fieldId = createChildId(DEFAULT_VALUE_ID_PART + propertyType.isInternalNamespace() - + propertyType.getSimpleCode()); + + replaceSpecialPropertyFieldIdChars(propertyType.getSimpleCode())); DatabaseModificationAwareField<?> fieldHolder = PropertyFieldFactory.createField(propertyType, false, viewContext .getMessage(Dict.DEFAULT_VALUE), fieldId, null, viewContext); diff --git a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeAssignmentForm.java b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeAssignmentForm.java index dd17cafb8ad481ebf9eaf2075627ab8dad336d44..160f57e4491928b436ee4ae00984dc8f26c9b1df 100644 --- a/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeAssignmentForm.java +++ b/openbis/sourceTest/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/property_type/FillPropertyTypeAssignmentForm.java @@ -157,13 +157,15 @@ public final class FillPropertyTypeAssignmentForm extends AbstractDefaultTestCom private String getSimpleCode(String code) { + String result; if (isInternalNamespace(code)) { - return code.substring(INTERNAL_PROPERTY_PREFIX.length()); + result = code.substring(INTERNAL_PROPERTY_PREFIX.length()); } else { - return code; + result = code; } + return PropertyTypeAssignmentForm.replaceSpecialPropertyFieldIdChars(result); } private boolean isInternalNamespace(String code)