Skip to content
Snippets Groups Projects
Commit d51b46ef authored by S.Listl's avatar S.Listl
Browse files

Attribute tree optimization

parent 24e7de4a
No related branches found
No related tags found
No related merge requests found
......@@ -10,5 +10,7 @@ if (vars.exists("$local.rows"))
var type = row[0].ATTRIBUTE_TYPE.trim();
if (type == $AttributeTypes.GROUP || type == $AttributeTypes.COMBO)
params["attrParentId_param"] = row[0].AB_ATTRIBUTEID;
else if (row[0].ATTRIBUTE_PARENT_ID)
params["attrParentId_param"] = row[0].ATTRIBUTE_PARENT_ID;
}
neon.openContext("Attribute", null, null, neon.OPERATINGSTATE_NEW, params);
\ No newline at end of file
......@@ -2,4 +2,5 @@ import("system.vars");
import("system.result");
import("Attribute_lib");
result.string(AttributeUtil.getFullAttributeName(vars.get("$field.AB_ATTRIBUTEID")));
var parentName = AttributeUtil.getFullAttributeName(vars.get("$field.ATTRIBUTE_PARENT_ID"));
result.string((parentName ? parentName + " / " : "") + vars.get("$field.ATTRIBUTE_NAME"));
......@@ -13,5 +13,8 @@
<addColumn tableName="AB_ATTRIBUTERELATION">
<column name="MEMO_VALUE" type="NCLOB"/>
</addColumn>
<createIndex indexName="IDX_ATTRPARENT" tableName="AB_ATTRIBUTE">
<column name="ATTRIBUTE_PARENT_ID"/>
</createIndex>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -64,6 +64,8 @@ AttributeUtil.getPossibleAttributes = function (pObjectType, pIncludeGroups, pFi
*/
AttributeUtil.getFullAttributeName = function (pAttributeId)
{
if (!pAttributeId)
return "";
var attributeNames = [];
var attribute;
var idType = SqlUtils.getSingleColumnType("AB_ATTRIBUTE.AB_ATTRIBUTEID");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment