Skip to content
Snippets Groups Projects
Commit 4929febd authored by Dominik Lechner's avatar Dominik Lechner
Browse files

DocumentTemplateCategory

parent e8d471e6
No related branches found
No related tags found
No related merge requests found
......@@ -2,13 +2,74 @@
<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>DocumentTemplateTypeCategory_entity</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<recordContainer>db</recordContainer>
<entityFields>
<entityProvider>
<name>#PROVIDER</name>
</entityProvider>
<entityParameter>
<name>usageFilterParam</name>
<name>usageFilter_param</name>
<expose v="true" />
<triggerRecalculation v="true" />
<description>PARAMETER</description>
</entityParameter>
<entityField>
<name>AB_KEYWORD_ENTRYID</name>
</entityField>
<entityField>
<name>KEYID</name>
</entityField>
<entityField>
<name>TITLE</name>
</entityField>
<entityProvider>
<name>ByCategory</name>
<fieldType>DEPENDENCY_IN</fieldType>
<recordContainer>db</recordContainer>
<dependencies>
<entityDependency>
<name>5eb6b17c-8c13-48df-84d5-a949b7d21cf3</name>
<entityName>DocumentTemplate_entity</entityName>
<fieldName>DocumentTemplateTypeCategory</fieldName>
<isConsumer v="false" />
</entityDependency>
</dependencies>
<children>
<entityParameter>
<name>usageFilter_param</name>
<expose v="true" />
</entityParameter>
</children>
</entityProvider>
</entityFields>
<recordContainers>
<dbRecordContainer>
<name>db</name>
<alias>Data_alias</alias>
<conditionProcess>%aditoprj%/entity/DocumentTemplateTypeCategory_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
<linkInformation>
<linkInformation>
<name>6cfa2424-b81b-4750-ae43-e3b1126eab0a</name>
<tableName>AB_KEYWORD_ENTRY</tableName>
<primaryKey>AB_KEYWORD_ENTRYID</primaryKey>
<isUIDTable v="true" />
<readonly v="false" />
</linkInformation>
</linkInformation>
<recordFieldMappings>
<dbRecordFieldMapping>
<name>AB_KEYWORD_ENTRYID.value</name>
<recordfield>AB_KEYWORD_ENTRY.AB_KEYWORD_ENTRYID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>KEYID.value</name>
<recordfield>AB_KEYWORD_ENTRY.KEYID</recordfield>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>TITLE.value</name>
<recordfield>AB_KEYWORD_ENTRY.TITLE</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
</entity>
import("system.logging");
import("system.db");
import("system.vars");
import("system.result");
import("KeywordRegistry_basic");
import("Sql_lib");
import("Keyword_lib");
var cond = SqlCondition.begin()
.andPrepare("AB_KEYWORD_ENTRY.CONTAINER", $KeywordRegistry.documentTemplateTypeCategory()());
logging.log("hallo");
var usageFilter = vars.get("$param.usageFilter_param");
if (usageFilter)
{
var keywordAttribute = new KeywordAttribute($KeywordRegistry.documentTemplateTypeCategory(), usageFilter);
cond.andAttachPrepared(SqlCondition.begin()
.andPrepare("AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ATTRIBUTE_ID", keywordAttribute.id)
.andPrepare("AB_KEYWORD_ATTRIBUTERELATION." + keywordAttribute.dbField, "1")
.buildSql("AB_KEYWORD_ENTRY.AB_KEYWORD_ENTRYID in (\n\
select AB_KEYWORD_ATTRIBUTERELATION.AB_KEYWORD_ENTRY_ID \n\
from AB_KEYWORD_ATTRIBUTERELATION ", null, ")"));
}
cond = db.translateStatement(cond.build("1 = 2"));
result.string(cond);
\ No newline at end of file
......@@ -162,13 +162,23 @@
<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>
......
import("system.vars");
import("system.result");
import("system.neon");
if(vars.get("$field.TYPE") != "")
{
result.string(neon.COMPONENTSTATE_EDITABLE);
}
\ No newline at end of file
import("system.logging");
import("system.vars");
import("system.result");
logging.log("aufruf");
result.object(vars.get("$field.TYPE"));
\ No newline at end of file
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