From 4782f327732f77f1d72c6df3c2925a3a169320b2 Mon Sep 17 00:00:00 2001 From: Sophia Leierseder <s.leierseder@adito.de> Date: Tue, 23 Apr 2019 16:25:59 +0200 Subject: [PATCH] DocumentTemplateLink_entity und DocumentTemplateLink Context --- .../DocumentTemplateLink_entity.aod | 122 +++++ .../doctemptype_param/valueProcess.js | 1 + .../entityfields/date_edit/valueProcess.js | 6 + .../entityfields/date_new/valueProcess.js | 6 + .../valueProcess.js | 4 + .../documenttemplatelinkid/valueProcess.js | 7 + .../entityfields/user_edit/valueProcess.js | 6 + .../entityfields/user_new/valueProcess.js | 6 + .../recordcontainers/db/conditionProcess.js | 10 + .../DocumentTemplate_entity.aod | 476 +++++++++--------- .../children/documentid_param/valueProcess.js | 4 + .../DocumentTemplateLink.aod | 12 + .../DocumentTemplateLinkMultiEdit_view.aod | 22 + 13 files changed, 439 insertions(+), 243 deletions(-) create mode 100644 entity/DocumentTemplateLink_entity/DocumentTemplateLink_entity.aod create mode 100644 entity/DocumentTemplateLink_entity/entityfields/attachments/children/doctemptype_param/valueProcess.js create mode 100644 entity/DocumentTemplateLink_entity/entityfields/date_edit/valueProcess.js create mode 100644 entity/DocumentTemplateLink_entity/entityfields/date_new/valueProcess.js create mode 100644 entity/DocumentTemplateLink_entity/entityfields/documenttemplate_id_parent/valueProcess.js create mode 100644 entity/DocumentTemplateLink_entity/entityfields/documenttemplatelinkid/valueProcess.js create mode 100644 entity/DocumentTemplateLink_entity/entityfields/user_edit/valueProcess.js create mode 100644 entity/DocumentTemplateLink_entity/entityfields/user_new/valueProcess.js create mode 100644 entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js create mode 100644 entity/DocumentTemplate_entity/entityfields/links/children/documentid_param/valueProcess.js create mode 100644 neonContext/DocumentTemplateLink/DocumentTemplateLink.aod create mode 100644 neonView/DocumentTemplateLinkMultiEdit_view/DocumentTemplateLinkMultiEdit_view.aod diff --git a/entity/DocumentTemplateLink_entity/DocumentTemplateLink_entity.aod b/entity/DocumentTemplateLink_entity/DocumentTemplateLink_entity.aod new file mode 100644 index 0000000000..15af50bc0a --- /dev/null +++ b/entity/DocumentTemplateLink_entity/DocumentTemplateLink_entity.aod @@ -0,0 +1,122 @@ +<?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>DocumentTemplateLink_entity</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>DATE_EDIT</name> + <contentType>DATE</contentType> + <resolution>DAY</resolution> + <valueProcess>%aditoprj%/entity/DocumentTemplateLink_entity/entityfields/date_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <contentType>DATE</contentType> + <resolution>DAY</resolution> + <valueProcess>%aditoprj%/entity/DocumentTemplateLink_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_EDIT</name> + <valueProcess>%aditoprj%/entity/DocumentTemplateLink_entity/entityfields/user_edit/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_NEW</name> + <valueProcess>%aditoprj%/entity/DocumentTemplateLink_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DOCUMENTTEMPLATE_ID_PARENT</name> + <valueProcess>%aditoprj%/entity/DocumentTemplateLink_entity/entityfields/documenttemplate_id_parent/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DOCUMENTTEMPLATELINKID</name> + <valueProcess>%aditoprj%/entity/DocumentTemplateLink_entity/entityfields/documenttemplatelinkid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DOCUMENTTEMPLATE_ID_CHILD</name> + </entityField> + <entityParameter> + <name>DocumentId_param</name> + <expose v="true" /> + <description>PARAMETER</description> + </entityParameter> + <entityConsumer> + <name>Attachments</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>DocumentTemplate_entity</entityName> + <fieldName>Attachments</fieldName> + </dependency> + <children> + <entityParameter> + <name>DocTempType_param</name> + <valueProcess>%aditoprj%/entity/DocumentTemplateLink_entity/entityfields/attachments/children/doctemptype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityProvider> + <name>Links</name> + <fieldType>DEPENDENCY_IN</fieldType> + <targetIdField>DOCUMENTTEMPLATE_ID_CHILD</targetIdField> + <recordContainer>db</recordContainer> + <dependencies> + <entityDependency> + <name>db3b7e04-ca3b-4205-a1d3-5e5e5cb13073</name> + <entityName>DocumentTemplate_entity</entityName> + <fieldName>Links</fieldName> + <isConsumer v="false" /> + </entityDependency> + </dependencies> + </entityProvider> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <conditionProcess>%aditoprj%/entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js</conditionProcess> + <linkInformation> + <linkInformation> + <name>99ab2840-c45e-4901-8383-91fbb8d82075</name> + <tableName>DOCUMENTTEMPLATELINK</tableName> + <primaryKey>DOCUMENTTEMPLATELINKID</primaryKey> + <isUIDTable v="true" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>DATE_EDIT.value</name> + <recordfield>DOCUMENTTEMPLATELINK.DATE_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>DOCUMENTTEMPLATELINK.DATE_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DOCUMENTTEMPLATE_ID_CHILD.value</name> + <recordfield>DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_CHILD</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DOCUMENTTEMPLATE_ID_PARENT.value</name> + <recordfield>DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_PARENT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DOCUMENTTEMPLATELINKID.value</name> + <recordfield>DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATELINKID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_EDIT.value</name> + <recordfield>DOCUMENTTEMPLATELINK.USER_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_NEW.value</name> + <recordfield>DOCUMENTTEMPLATELINK.USER_NEW</recordfield> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/DocumentTemplateLink_entity/entityfields/attachments/children/doctemptype_param/valueProcess.js b/entity/DocumentTemplateLink_entity/entityfields/attachments/children/doctemptype_param/valueProcess.js new file mode 100644 index 0000000000..98a7b42953 --- /dev/null +++ b/entity/DocumentTemplateLink_entity/entityfields/attachments/children/doctemptype_param/valueProcess.js @@ -0,0 +1 @@ +//TODO: Es sollen hier nur die Anhänge gelistet werden! \ No newline at end of file diff --git a/entity/DocumentTemplateLink_entity/entityfields/date_edit/valueProcess.js b/entity/DocumentTemplateLink_entity/entityfields/date_edit/valueProcess.js new file mode 100644 index 0000000000..1615e15bf3 --- /dev/null +++ b/entity/DocumentTemplateLink_entity/entityfields/date_edit/valueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) + result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/DocumentTemplateLink_entity/entityfields/date_new/valueProcess.js b/entity/DocumentTemplateLink_entity/entityfields/date_new/valueProcess.js new file mode 100644 index 0000000000..9477aae864 --- /dev/null +++ b/entity/DocumentTemplateLink_entity/entityfields/date_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.get("$sys.date")); \ No newline at end of file diff --git a/entity/DocumentTemplateLink_entity/entityfields/documenttemplate_id_parent/valueProcess.js b/entity/DocumentTemplateLink_entity/entityfields/documenttemplate_id_parent/valueProcess.js new file mode 100644 index 0000000000..4be9f65997 --- /dev/null +++ b/entity/DocumentTemplateLink_entity/entityfields/documenttemplate_id_parent/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$param.DocumentId_param")) \ No newline at end of file diff --git a/entity/DocumentTemplateLink_entity/entityfields/documenttemplatelinkid/valueProcess.js b/entity/DocumentTemplateLink_entity/entityfields/documenttemplatelinkid/valueProcess.js new file mode 100644 index 0000000000..a2378ee42b --- /dev/null +++ b/entity/DocumentTemplateLink_entity/entityfields/documenttemplatelinkid/valueProcess.js @@ -0,0 +1,7 @@ +import("system.util"); +import("system.vars"); +import("system.result"); +import("system.neon"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(util.getNewUUID()); \ No newline at end of file diff --git a/entity/DocumentTemplateLink_entity/entityfields/user_edit/valueProcess.js b/entity/DocumentTemplateLink_entity/entityfields/user_edit/valueProcess.js new file mode 100644 index 0000000000..9abd7045ee --- /dev/null +++ b/entity/DocumentTemplateLink_entity/entityfields/user_edit/valueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_EDIT) + result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/DocumentTemplateLink_entity/entityfields/user_new/valueProcess.js b/entity/DocumentTemplateLink_entity/entityfields/user_new/valueProcess.js new file mode 100644 index 0000000000..ad6636be18 --- /dev/null +++ b/entity/DocumentTemplateLink_entity/entityfields/user_new/valueProcess.js @@ -0,0 +1,6 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) + result.string(vars.get("$sys.user")); \ No newline at end of file diff --git a/entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js b/entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js new file mode 100644 index 0000000000..d1d7f21be9 --- /dev/null +++ b/entity/DocumentTemplateLink_entity/recordcontainers/db/conditionProcess.js @@ -0,0 +1,10 @@ +import("system.vars"); +import("system.db"); +import("system.result"); +import("Sql_lib"); + +var cond = SqlCondition.begin() + .andPrepareVars("DOCUMENTTEMPLATELINK.DOCUMENTTEMPLATE_ID_PARENT", "$param.DocumentId_param"); + +//TODO: use a preparedCondition when available #1030812 #1034026 +result.string(db.translateCondition(cond.build("1 = 0"))); \ No newline at end of file diff --git a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod index 10c12a00a1..313c6cbec7 100644 --- a/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod +++ b/entity/DocumentTemplate_entity/DocumentTemplate_entity.aod @@ -1,243 +1,233 @@ -<?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.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.1"> - <name>DocumentTemplate_entity</name> - <title>Document Template</title> - <majorModelMode>DISTRIBUTED</majorModelMode> - <icon>VAADIN:FILE_FONT</icon> - <recordContainer>db</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - </entityProvider> - <entityField> - <name>DATE_EDIT</name> - <title>Date edit</title> - </entityField> - <entityField> - <name>DESCRIPTION</name> - <title>Description</title> - <contentType>LONG_TEXT</contentType> - </entityField> - <entityField> - <name>DOCUMENTTEMPLATEID</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documenttemplateid/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>DATE_NEW</name> - <title>Date new</title> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/date_new/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>USER_NEW</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/user_new/valueProcess.js</valueProcess> - </entityField> - <entityField> - <name>TYPE</name> - <title>Type</title> - <consumer>KeywordDocumentTemplateType</consumer> - <mandatory v="true" /> - <displayValueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/type/displayValueProcess.js</displayValueProcess> - <onValueChange>%aditoprj%/entity/DocumentTemplate_entity/entityfields/type/onValueChange.js</onValueChange> - </entityField> - <entityField> - <name>USER_EDIT</name> - </entityField> - <entityField> - <name>NAME</name> - <title>Name</title> - <mandatory v="true" /> - </entityField> - <entityField> - <name>LANGUAGE</name> - <title>Language</title> - <consumer>Languages</consumer> - <mandatory v="true" /> - <displayValueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/language/displayValueProcess.js</displayValueProcess> - </entityField> - <entityField> - <name>BINDATA</name> - <contentType>FILE</contentType> - <onValueChange>%aditoprj%/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js</onValueChange> - </entityField> - <entityConsumer> - <name>Documents</name> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>Document_entity</entityName> - <fieldName>Documents</fieldName> - </dependency> - <children> - <entityParameter> - <name>AssignmentTable_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AssignmentRowId_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>AssignmentName_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documents/children/assignmentname_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>Languages</name> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>Language_entity</entityName> - <fieldName>ISO3Name</fieldName> - </dependency> - </entityConsumer> - <entityConsumer> - <name>KeywordDocumentTemplateType</name> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>KeywordEntry_entity</entityName> - <fieldName>SpecificContainerKeywords</fieldName> - </dependency> - <children> - <entityParameter> - <name>ContainerName_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/keyworddocumenttemplatetype/children/containername_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>AttributeTree</name> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>AttributeRelationTree_entity</entityName> - <fieldName>TreeProvider</fieldName> - </dependency> - <children> - <entityParameter> - <name>ObjectRowId_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityConsumer> - <name>Attributes</name> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>AttributeRelation_entity</entityName> - <fieldName>RelationsForSpecificObject</fieldName> - </dependency> - <children> - <entityParameter> - <name>ObjectRowId_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess> - </entityParameter> - <entityParameter> - <name>ObjectType_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>htmlText</name> - <title>HTML</title> - <contentType>HTML</contentType> - <state>INVISIBLE</state> - <stateProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/htmltext/stateProcess.js</stateProcess> - </entityField> - <entityField> - <name>texText</name> - <title>Text</title> - <contentType>LONG_TEXT</contentType> - <state>INVISIBLE</state> - <stateProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/textext/stateProcess.js</stateProcess> - </entityField> - <entityField> - <name>CLASSIFICATION</name> - <title>Classification</title> - <consumer>DocumentTemplateTypeCategory</consumer> - <state>DISABLED</state> - <stateProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/classification/stateProcess.js</stateProcess> - </entityField> - <entityConsumer> - <name>DocumentTemplateTypeCategory</name> - <fieldType>DEPENDENCY_OUT</fieldType> - <dependency> - <name>dependency</name> - <entityName>DocumentTemplateTypeCategory_entity</entityName> - <fieldName>ByCategory</fieldName> - </dependency> - <children> - <entityParameter> - <name>usageFilter_param</name> - <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documenttemplatetypecategory/children/usagefilter_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - </entityFields> - <recordContainers> - <dbRecordContainer> - <name>db</name> - <alias>Data_alias</alias> - <onDBInsert>%aditoprj%/entity/DocumentTemplate_entity/recordcontainers/db/onDBInsert.js</onDBInsert> - <onDBUpdate>%aditoprj%/entity/DocumentTemplate_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> - <linkInformation> - <linkInformation> - <name>982325b6-d12e-43f9-8ac2-c4b9f013aafd</name> - <tableName>DOCUMENTTEMPLATE</tableName> - <primaryKey>DOCUMENTTEMPLATEID</primaryKey> - <isUIDTable v="false" /> - <readonly v="false" /> - </linkInformation> - </linkInformation> - <recordFieldMappings> - <dbRecordFieldMapping> - <name>DATE_EDIT.value</name> - <recordfield>DOCUMENTTEMPLATE.DATE_EDIT</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DATE_NEW.value</name> - <recordfield>DOCUMENTTEMPLATE.DATE_NEW</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DESCRIPTION.value</name> - <recordfield>DOCUMENTTEMPLATE.DESCRIPTION</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>LANGUAGE.value</name> - <recordfield>DOCUMENTTEMPLATE.LANGUAGE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>NAME.value</name> - <recordfield>DOCUMENTTEMPLATE.NAME</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>TYPE.value</name> - <recordfield>DOCUMENTTEMPLATE.TYPE</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>USER_EDIT.value</name> - <recordfield>DOCUMENTTEMPLATE.USER_EDIT</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>USER_NEW.value</name> - <recordfield>DOCUMENTTEMPLATE.USER_NEW</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DOCUMENTTEMPLATEID.value</name> - <recordfield>DOCUMENTTEMPLATE.DOCUMENTTEMPLATEID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>CLASSIFICATION.value</name> - <recordfield>DOCUMENTTEMPLATE.CLASSIFICATION</recordfield> - </dbRecordFieldMapping> - </recordFieldMappings> - </dbRecordContainer> - </recordContainers> -</entity> +<?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>DocumentTemplate_entity</name> + <title>Document Template</title> + <majorModelMode>DISTRIBUTED</majorModelMode> + <icon>VAADIN:FILE_FONT</icon> + <recordContainer>db</recordContainer> + <entityFields> + <entityProvider> + <name>#PROVIDER</name> + </entityProvider> + <entityField> + <name>DATE_EDIT</name> + <title>Date edit</title> + </entityField> + <entityField> + <name>DESCRIPTION</name> + <title>Description</title> + <contentType>LONG_TEXT</contentType> + </entityField> + <entityField> + <name>DOCUMENTTEMPLATEID</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documenttemplateid/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>DATE_NEW</name> + <title>Date new</title> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/date_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>USER_NEW</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/user_new/valueProcess.js</valueProcess> + </entityField> + <entityField> + <name>TYPE</name> + <title>Type</title> + <consumer>KeywordDocumentTemplateType</consumer> + <mandatory v="true" /> + <displayValueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/type/displayValueProcess.js</displayValueProcess> + <onValueChange>%aditoprj%/entity/DocumentTemplate_entity/entityfields/type/onValueChange.js</onValueChange> + </entityField> + <entityField> + <name>USER_EDIT</name> + </entityField> + <entityField> + <name>NAME</name> + <title>Name</title> + <mandatory v="true" /> + </entityField> + <entityField> + <name>LANGUAGE</name> + <title>Language</title> + <consumer>Languages</consumer> + <mandatory v="true" /> + <displayValueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/language/displayValueProcess.js</displayValueProcess> + </entityField> + <entityField> + <name>BINDATA</name> + <contentType>FILE</contentType> + <onValueChange>%aditoprj%/entity/DocumentTemplate_entity/entityfields/bindata/onValueChange.js</onValueChange> + </entityField> + <entityConsumer> + <name>Documents</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Document_entity</entityName> + <fieldName>Documents</fieldName> + </dependency> + <children> + <entityParameter> + <name>AssignmentTable_param</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documents/children/assignmenttable_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AssignmentRowId_param</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documents/children/assignmentrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>AssignmentName_param</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/documents/children/assignmentname_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Languages</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>Language_entity</entityName> + <fieldName>ISO3Name</fieldName> + </dependency> + </entityConsumer> + <entityConsumer> + <name>KeywordDocumentTemplateType</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>KeywordEntry_entity</entityName> + <fieldName>SpecificContainerKeywords</fieldName> + </dependency> + <children> + <entityParameter> + <name>ContainerName_param</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/keyworddocumenttemplatetype/children/containername_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>AttributeTree</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>AttributeRelationTree_entity</entityName> + <fieldName>TreeProvider</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectRowId_param</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/attributetree/children/objectrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/attributetree/children/objecttype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityConsumer> + <name>Attributes</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + <entityName>AttributeRelation_entity</entityName> + <fieldName>RelationsForSpecificObject</fieldName> + </dependency> + <children> + <entityParameter> + <name>ObjectRowId_param</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/attributes/children/objectrowid_param/valueProcess.js</valueProcess> + </entityParameter> + <entityParameter> + <name>ObjectType_param</name> + <valueProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/attributes/children/objecttype_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> + <entityField> + <name>htmlText</name> + <title>HTML</title> + <contentType>HTML</contentType> + <state>INVISIBLE</state> + <stateProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/htmltext/stateProcess.js</stateProcess> + </entityField> + <entityField> + <name>texText</name> + <title>Text</title> + <contentType>LONG_TEXT</contentType> + <state>INVISIBLE</state> + <stateProcess>%aditoprj%/entity/DocumentTemplate_entity/entityfields/textext/stateProcess.js</stateProcess> + </entityField> + <entityField> + <name>CLASSIFICATION</name> + <title>Classification</title> + <consumer>DocumentTemplateTypeCategory</consumer> + </entityField> + <entityConsumer> + <name>DocumentTemplateTypeCategory</name> + <fieldType>DEPENDENCY_OUT</fieldType> + <dependency> + <name>dependency</name> + </dependency> + </entityConsumer> + </entityFields> + <recordContainers> + <dbRecordContainer> + <name>db</name> + <alias>Data_alias</alias> + <onDBInsert>%aditoprj%/entity/DocumentTemplate_entity/recordcontainers/db/onDBInsert.js</onDBInsert> + <onDBUpdate>%aditoprj%/entity/DocumentTemplate_entity/recordcontainers/db/onDBUpdate.js</onDBUpdate> + <linkInformation> + <linkInformation> + <name>982325b6-d12e-43f9-8ac2-c4b9f013aafd</name> + <tableName>DOCUMENTTEMPLATE</tableName> + <primaryKey>DOCUMENTTEMPLATEID</primaryKey> + <isUIDTable v="false" /> + <readonly v="false" /> + </linkInformation> + </linkInformation> + <recordFieldMappings> + <dbRecordFieldMapping> + <name>DATE_EDIT.value</name> + <recordfield>DOCUMENTTEMPLATE.DATE_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DATE_NEW.value</name> + <recordfield>DOCUMENTTEMPLATE.DATE_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DESCRIPTION.value</name> + <recordfield>DOCUMENTTEMPLATE.DESCRIPTION</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>LANGUAGE.value</name> + <recordfield>DOCUMENTTEMPLATE.LANGUAGE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>NAME.value</name> + <recordfield>DOCUMENTTEMPLATE.NAME</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>TYPE.value</name> + <recordfield>DOCUMENTTEMPLATE.TYPE</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_EDIT.value</name> + <recordfield>DOCUMENTTEMPLATE.USER_EDIT</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>USER_NEW.value</name> + <recordfield>DOCUMENTTEMPLATE.USER_NEW</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>DOCUMENTTEMPLATEID.value</name> + <recordfield>DOCUMENTTEMPLATE.DOCUMENTTEMPLATEID</recordfield> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>CLASSIFICATION.value</name> + <recordfield>DOCUMENTTEMPLATE.CLASSIFICATION</recordfield> + </dbRecordFieldMapping> + </recordFieldMappings> + </dbRecordContainer> + </recordContainers> +</entity> diff --git a/entity/DocumentTemplate_entity/entityfields/links/children/documentid_param/valueProcess.js b/entity/DocumentTemplate_entity/entityfields/links/children/documentid_param/valueProcess.js new file mode 100644 index 0000000000..67b75101e5 --- /dev/null +++ b/entity/DocumentTemplate_entity/entityfields/links/children/documentid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.DOCUMENTTEMPLATEID")); \ No newline at end of file diff --git a/neonContext/DocumentTemplateLink/DocumentTemplateLink.aod b/neonContext/DocumentTemplateLink/DocumentTemplateLink.aod new file mode 100644 index 0000000000..c0cc54b60d --- /dev/null +++ b/neonContext/DocumentTemplateLink/DocumentTemplateLink.aod @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonContext xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.0" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonContext/1.1.0"> + <name>DocumentTemplateLink</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <entity>DocumentTemplateLink_entity</entity> + <references> + <neonViewReference> + <name>f21abb6d-0abf-472e-8f5e-2b2578d355ea</name> + <view>DocumentTemplateLinkMultiEdit_view</view> + </neonViewReference> + </references> +</neonContext> diff --git a/neonView/DocumentTemplateLinkMultiEdit_view/DocumentTemplateLinkMultiEdit_view.aod b/neonView/DocumentTemplateLinkMultiEdit_view/DocumentTemplateLinkMultiEdit_view.aod new file mode 100644 index 0000000000..c2f87e173c --- /dev/null +++ b/neonView/DocumentTemplateLinkMultiEdit_view/DocumentTemplateLinkMultiEdit_view.aod @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>DocumentTemplateLinkMultiEdit_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <genericMultipleViewTemplate> + <name>MultipleEdit</name> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>c379aae6-f79e-424c-b379-d7393e63bc4e</name> + <entityField>DOCUMENTTEMPLATE_ID_CHILD</entityField> + </neonTableColumn> + </columns> + </genericMultipleViewTemplate> + </children> +</neonView> -- GitLab