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

AttributeRelation and AttributeRelationTree combined

parent d7bf9300
No related branches found
No related tags found
No related merge requests found
Showing
with 195 additions and 454 deletions
<?xml version="1.0" encoding="UTF-8"?>
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.2">
<name>Activity_entity</name>
<title>Activity</title>
<majorModelMode>DISTRIBUTED</majorModelMode>
<documentation>%aditoprj%/entity/Activity_entity/documentation.adoc</documentation>
<title>Activity</title>
<afterUiInit>%aditoprj%/entity/Activity_entity/afterUiInit.js</afterUiInit>
<iconId>NEON:HISTORY</iconId>
<image>VAADIN:SHOP</image>
......@@ -360,7 +360,7 @@
<dependency>
<name>dependency</name>
<entityName>AttributeRelation_entity</entityName>
<fieldName>RelationsForSpecificObject</fieldName>
<fieldName>AttributeRelations</fieldName>
</dependency>
<children>
<entityParameter>
......@@ -402,7 +402,7 @@
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>AttributeRelationTree_entity</entityName>
<entityName>AttributeRelation_entity</entityName>
<fieldName>TreeProvider</fieldName>
</dependency>
<children>
......
<?xml version="1.0" encoding="UTF-8"?>
<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.2" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.2">
<name>AttributeRelationTree_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<recordContainer>jdito</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
<entityField>
<name>PARENT_ID</name>
</entityField>
<entityField>
<name>UID</name>
</entityField>
<entityParameter>
<name>ObjectType_param</name>
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityParameter>
<name>ObjectRowId_param</name>
<expose v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityProvider>
<name>TreeProvider</name>
<fieldType>DEPENDENCY_IN</fieldType>
<dependencies>
<entityDependency>
<name>e0a7a4bc-ec7f-4f09-9b94-cbeb328cd7b8</name>
<entityName>Organisation_entity</entityName>
<fieldName>AttributeTree</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>f29d91fe-2537-486f-b9de-44065a7790d4</name>
<entityName>Person_entity</entityName>
<fieldName>AttributeTree</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>445c1bd7-4e72-4ab7-a5b1-cc77924eb562</name>
<entityName>Product_entity</entityName>
<fieldName>AttributeTree</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>4498139f-067c-4cca-b122-d9bc9100c53d</name>
<entityName>Activity_entity</entityName>
<fieldName>AttributeTree</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>d6d5f9aa-4582-4ec5-9381-394a38a726e8</name>
<entityName>Offer_entity</entityName>
<fieldName>AttributeTree</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>b728166d-a74f-4ca1-8ce7-7e57032f2a7d</name>
<entityName>Contract_entity</entityName>
<fieldName>AttributeTree</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>3921c712-d15c-4941-b04d-44f4536dc404</name>
<entityName>Employee_entity</entityName>
<fieldName>AttributeTree</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>148faad1-78f6-4ff2-a4d5-9607d919adb9</name>
<entityName>Salesproject_entity</entityName>
<fieldName>AttributeTree</fieldName>
<isConsumer v="false" />
</entityDependency>
<entityDependency>
<name>8ed8bae6-c69e-45ce-9fc9-5fb43587a47b</name>
<entityName>Order_entity</entityName>
<fieldName>AttributeTree</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
</entityProvider>
<entityField>
<name>AB_ATTRIBUTE_ID</name>
<title>Attribute</title>
<consumer>SpecificAttribute</consumer>
<onValueChange>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/ab_attribute_id/onValueChange.js</onValueChange>
</entityField>
<entityField>
<name>VALUE</name>
<title>Value</title>
<contentTypeProcess>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/value/contentTypeProcess.js</contentTypeProcess>
<resolution>DAY</resolution>
<mandatoryProcess>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/value/mandatoryProcess.js</mandatoryProcess>
<dropDownProcess>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/value/dropDownProcess.js</dropDownProcess>
<stateProcess>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/value/stateProcess.js</stateProcess>
</entityField>
<entityConsumer>
<name>SpecificAttribute</name>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
<name>dependency</name>
<entityName>Attribute_entity</entityName>
<fieldName>SpecificAttribute</fieldName>
</dependency>
<children>
<entityParameter>
<name>ObjectType_param</name>
<valueProcess>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/specificattribute/children/objecttype_param/valueProcess.js</valueProcess>
<triggerRecalculation v="true" />
</entityParameter>
<entityParameter>
<name>AttributeCount_param</name>
<valueProcess>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/specificattribute/children/attributecount_param/valueProcess.js</valueProcess>
</entityParameter>
</children>
</entityConsumer>
<entityActionGroup>
<name>alter</name>
<children>
<entityActionField>
<name>edit</name>
<fieldType>ACTION</fieldType>
<onActionProcess>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/alter/children/edit/onActionProcess.js</onActionProcess>
<iconId>NEON:PENCIL</iconId>
<stateProcess>%aditoprj%/entity/AttributeRelationTree_entity/entityfields/alter/children/edit/stateProcess.js</stateProcess>
</entityActionField>
</children>
</entityActionGroup>
</entityFields>
<recordContainers>
<jDitoRecordContainer>
<name>jdito</name>
<jDitoRecordAlias>Data_alias</jDitoRecordAlias>
<contentProcess>%aditoprj%/entity/AttributeRelationTree_entity/recordcontainers/jdito/contentProcess.js</contentProcess>
<onInsert>%aditoprj%/entity/AttributeRelationTree_entity/recordcontainers/jdito/onInsert.js</onInsert>
<onUpdate>%aditoprj%/entity/AttributeRelationTree_entity/recordcontainers/jdito/onUpdate.js</onUpdate>
<onDelete>%aditoprj%/entity/AttributeRelationTree_entity/recordcontainers/jdito/onDelete.js</onDelete>
<recordFields>
<element>UID.value</element>
<element>PARENT_ID.value</element>
<element>VALUE.value</element>
<element>VALUE.displayValue</element>
<element>AB_ATTRIBUTE_ID.value</element>
<element>AB_ATTRIBUTE_ID.displayValue</element>
</recordFields>
</jDitoRecordContainer>
</recordContainers>
</entity>
import("system.vars");
import("system.neon");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT ||
vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
neon.setFieldValue("$field.VALUE", null);
}
\ No newline at end of file
import("system.result");
import("system.vars");
import("system.neon");
import("Attribute_lib");
var state = neon.COMPONENTSTATE_DISABLED;
if (vars.exists("$local.rows"))
{
var row = JSON.parse(vars.get("$local.rows"))[0];
if (row.AB_ATTRIBUTE_ID)
state = neon.COMPONENTSTATE_EDITABLE;
}
result.string(state);
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.exists("$param.ObjectType_param") ? vars.get("$param.ObjectType_param") : "");
Attribute Relation
==================
----
an entity for managing values that are set for an attribute
----
\ No newline at end of file
import("system.vars");
import("system.result");
import("Attribute_lib");
result.string(AttributeUtil.getFullAttributeName(
vars.get("$field.AB_ATTRIBUTE_ID"),
vars.exists("$param.DisplaySimpleName_param") ? vars.get("$param.DisplaySimpleName_param") : false ));
\ No newline at end of file
......@@ -2,10 +2,7 @@ import("system.vars");
import("system.neon");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT ||
vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) {
neon.setFieldValue("$field.INT_VALUE", null);
neon.setFieldValue("$field.CHAR_VALUE", null);
neon.setFieldValue("$field.DATE_VALUE", null);
neon.setFieldValue("$field.ID_VALUE", null);
neon.setFieldValue("$field.NUMBER_VALUE", null);
vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
{
neon.setFieldValue("$field.VALUE", null);
}
\ No newline at end of file
//TODO: the attribute id should be readonly if a value is set
\ No newline at end of file
import("system.neon");
import("system.util");
import("system.vars");
import("system.result");
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
result.string(util.getNewUUID());
\ No newline at end of file
//import("system.result");
//import("system.vars");
//import("system.neon");
//import("Attribute_lib");
//
//var state = neon.COMPONENTSTATE_DISABLED;
//if (vars.exists("$local.rows"))
//{
// var row = JSON.parse(vars.get("$local.rows"))[0];
// if (row.AB_ATTRIBUTE_ID)
// state = neon.COMPONENTSTATE_EDITABLE;
//}
//result.string(state);
\ No newline at end of file
import("system.vars");
import("system.result");
if(!vars.get("$field.INT_VALUE"))
result.string("0");
\ No newline at end of file
import("system.db");
import("system.result");
import("Sql_lib")
var attrKeywordSelect = "select KEYWORD_CONTAINER from AB_ATTRIBUTE";
attrKeywordSelect = SqlCondition.begin()
.andPrepareVars("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$field.AB_ATTRIBUTE_ID")
.buildSql(attrKeywordSelect);
result.string(db.cell(attrKeywordSelect));
\ No newline at end of file
import("system.db");
import("system.result");
import("Sql_lib")
var attrKeywordSelect = "select KEYWORD_CONTAINER from AB_ATTRIBUTE";
attrKeywordSelect = SqlCondition.begin()
.andPrepareVars("AB_ATTRIBUTE.AB_ATTRIBUTEID", "$field.AB_ATTRIBUTE_ID")
.buildSql(attrKeywordSelect);
result.string(db.cell(attrKeywordSelect));
import("system.vars");
import("system.result");
import("system.neon");
if (vars.exists("$param.ObjectRowId_param") && vars.get("$param.ObjectRowId_param") != null)
result.string(vars.get("$param.ObjectRowId_param"));
\ No newline at end of file
import("system.vars");
import("system.result");
import("system.neon");
if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.ObjectType_param") && vars.get("$param.ObjectType_param") != null)
result.string(vars.get("$param.ObjectType_param"));
\ No newline at end of file
import("system.vars");
import("system.result");
result.string(vars.exists("$param.DisplaySimpleName_param") ? vars.get("$param.DisplaySimpleName_param") : "");
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