diff --git a/entity/AttributeUsage_entity/AttributeUsage_entity.aod b/entity/AttributeUsage_entity/AttributeUsage_entity.aod index 5d9e1756ba2ec225dc8c9ad6be50ebdc09810ad7..d1927a9c638141370d7e3008c3132f1f3a96db07 100644 --- a/entity/AttributeUsage_entity/AttributeUsage_entity.aod +++ b/entity/AttributeUsage_entity/AttributeUsage_entity.aod @@ -17,6 +17,7 @@ <name>OBJECT_TYPE</name> <title>Module</title> <consumer>Context</consumer> + <mandatory v="true" /> <displayValueProcess>%aditoprj%/entity/AttributeUsage_entity/entityfields/object_type/displayValueProcess.js</displayValueProcess> <onValueChangeTypes> <element>MASK</element> diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod index 5f68f832aba44dcadf7fe19d846cfc0feb10bd73..d1aee4e2e47ea193237016189b59ba7b0ba05d24 100644 --- a/entity/Attribute_entity/Attribute_entity.aod +++ b/entity/Attribute_entity/Attribute_entity.aod @@ -54,6 +54,7 @@ </entityField> <entityParameter> <name>ChildId_param</name> + <expose v="true" /> <description>PARAMETER</description> </entityParameter> <entityConsumer> @@ -119,6 +120,7 @@ </entityField> <entityParameter> <name>ChildType_param</name> + <expose v="true" /> <description>PARAMETER</description> </entityParameter> <entityParameter> @@ -163,6 +165,14 @@ <name>GetGroups_param</name> <expose v="false" /> </entityParameter> + <entityParameter> + <name>ChildId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ChildType_param</name> + <expose v="false" /> + </entityParameter> </children> </entityProvider> <entityField> @@ -189,14 +199,6 @@ <entityProvider> <name>AttributeGroups</name> <children> - <entityParameter> - <name>ChildId_param</name> - <expose v="true" /> - </entityParameter> - <entityParameter> - <name>ChildType_param</name> - <expose v="true" /> - </entityParameter> <entityParameter> <name>ThemeObjectRowId_param</name> <expose v="false" /> @@ -212,12 +214,12 @@ </dependency> <children> <entityParameter> - <name>AttrParentId_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/attrparentid_param/valueProcess.js</valueProcess> + <name>ChildId_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/childid_param/valueProcess.js</valueProcess> </entityParameter> <entityParameter> - <name>AttrParentType_param</name> - <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/attrparenttype_param/valueProcess.js</valueProcess> + <name>ChildType_param</name> + <valueProcess>%aditoprj%/entity/Attribute_entity/entityfields/attributegroup/children/childtype_param/valueProcess.js</valueProcess> </entityParameter> </children> </entityConsumer> @@ -330,6 +332,14 @@ <name>AttributeCount_param</name> <expose v="false" /> </entityParameter> + <entityParameter> + <name>ChildId_param</name> + <expose v="false" /> + </entityParameter> + <entityParameter> + <name>ChildType_param</name> + <expose v="false" /> + </entityParameter> </children> </entityProvider> </entityFields> diff --git a/entity/Attribute_entity/entityfields/attributegroup/children/attrparenttype_param/valueProcess.js b/entity/Attribute_entity/entityfields/attributegroup/children/attrparenttype_param/valueProcess.js deleted file mode 100644 index 51a4aa93d6b8c3918e9ce88cffe3f2705af2c822..0000000000000000000000000000000000000000 --- a/entity/Attribute_entity/entityfields/attributegroup/children/attrparenttype_param/valueProcess.js +++ /dev/null @@ -1,4 +0,0 @@ -import("system.vars"); -import("system.result"); - -result.string(vars.getString("$field.ATTRIBUTE_TYPE").trim()); diff --git a/entity/Attribute_entity/entityfields/attributegroup/children/attrparentid_param/valueProcess.js b/entity/Attribute_entity/entityfields/attributegroup/children/childid_param/valueProcess.js similarity index 100% rename from entity/Attribute_entity/entityfields/attributegroup/children/attrparentid_param/valueProcess.js rename to entity/Attribute_entity/entityfields/attributegroup/children/childid_param/valueProcess.js diff --git a/entity/Attribute_entity/entityfields/attributegroup/children/childtype_param/valueProcess.js b/entity/Attribute_entity/entityfields/attributegroup/children/childtype_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..fee1dfa70bf01fae802cda3d838e9aff983b6924 --- /dev/null +++ b/entity/Attribute_entity/entityfields/attributegroup/children/childtype_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.ATTRIBUTE_TYPE").trim()); \ No newline at end of file diff --git a/process/Attribute_lib/process.js b/process/Attribute_lib/process.js index 0e9e19553c4f6fe1e823fa1ee0e28557dad83d3b..3443fb494ab6846164abe92121fe92a1a702c477 100644 --- a/process/Attribute_lib/process.js +++ b/process/Attribute_lib/process.js @@ -952,7 +952,7 @@ AttributeTypeUtil.getGroupTypes = function (pChildType) var groupTypes = []; for (let type in $AttributeTypes) { - if (AttributeUtil.isGroupType(type) && (!AttributeTypeUtil.getPossibleChildren(type) || AttributeTypeUtil.getPossibleChildren(type).indexOf(pChildType) !== -1)) + if (AttributeTypeUtil.isGroupType(type) && (!AttributeTypeUtil.getPossibleChildren(type) || AttributeTypeUtil.getPossibleChildren(type).indexOf(pChildType) !== -1)) groupTypes.push(type); } return groupTypes; @@ -1368,7 +1368,7 @@ AttributeRelationQuery.prototype.getSingleAttributeValue = function () AttributeRelationQuery.prototype.getAttributeCount = function () { return parseInt(AttributeRelationUtils.getAttributeSqlBuilder("count(*)", this._rowId, this._objectType) - .andIfSet("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID", this._attributeId) + .andIfSet("AB_ATTRIBUTERELATION.AB_ATTRIBUTE_ID", this._attributeIds) .cell() || 0); }