diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/CISDBaseModel.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/CISDBaseModel.java new file mode 100644 index 0000000000000000000000000000000000000000..cc2afbb05e0f604b8e88aaf560c505da654550c9 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/CISDBaseModel.java @@ -0,0 +1,59 @@ +/* + * Copyright 2009 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.openbis.generic.client.web.client.application.model; + +import java.util.Map; + +import com.extjs.gxt.ui.client.data.BaseModel; + +/** + * A Subclass of the GXT BaseModel that, by default, turns off nested value support. + * + * NestedValues check for key strings with '.' in then treat them as paths for traversing multiple + * HashMaps. + * + * We don't need this, and, in fact, it causes problems for us, since we occasionally use '.' as + * part of a normal column name for a table without intending the nested-value semantics; thus we + * turn it off. + * + * @author Chandrasekhar Ramakrishnan + */ +public abstract class CISDBaseModel extends BaseModel +{ + + private static final long serialVersionUID = 1L; + + /** + * + * + */ + public CISDBaseModel() + { + super(); + setAllowNestedValues(false); + } + + /** + * @param properties + */ + public CISDBaseModel(Map<String, Object> properties) + { + super(properties); + setAllowNestedValues(false); + } + +} diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/CISDBaseModelData.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/CISDBaseModelData.java new file mode 100644 index 0000000000000000000000000000000000000000..c8d13e2e19038101ca443c037672af98c6e49e60 --- /dev/null +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/model/CISDBaseModelData.java @@ -0,0 +1,61 @@ +/* + * Copyright 2009 ETH Zuerich, CISD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package ch.systemsx.cisd.openbis.generic.client.web.client.application.model; + +import java.util.Map; + +import com.extjs.gxt.ui.client.data.BaseModelData; + +/** + * A Subclass of the GXT BaseModelData that, by default, turns off nested value support. + * + * NestedValues check for key strings with '.' in then treat them as paths for traversing multiple + * HashMaps. + * + * We don't need this, and, in fact, it causes problems for us, since we occasionally use '.' as + * part of a normal column name for a table without intending the nested-value semantics; thus we + * turn it off. + * + * @author Chandrasekhar Ramakrishnan + */ +public abstract class CISDBaseModelData extends BaseModelData +{ + + private static final long serialVersionUID = 1L; + + /** + * + * + */ + public CISDBaseModelData() + { + super(); + setAllowNestedValues(false); + } + + /** + * + * + * @param properties + */ + public CISDBaseModelData(Map<String, Object> properties) + { + super(properties); + setAllowNestedValues(false); + } + +}