@Component public class CmsDictionaryExcludeValueDirective extends AbstractTemplateDirective
参数列表
dictionaryId
:数据字典id
excludeDictionaryId
:排除的字典
value
字典值,结果返回object
CmsDictionaryExcludeValue
values
多个的字典值,逗号或空格间隔,当value为空时生效,结果返回map
(id,object
)
<@cms.dictionaryExcludeValue dictionaryId='data' excludeDictionaryId='data1' value='data1'>${object.excludeValues}</@cms.dictionaryExcludeValue>
<@cms.dictionaryExcludeValue dictionaryId='data' excludeDictionaryId='data1' values='1,2'><#list map as k,v>${k}:${v.excludeValues}<#sep>,</#list></@cms.dictionaryExcludeValue>
<script> $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExcludeValue?dictionaryId=data&excludeDictionaryId=data1&value=1', function(data){ console.log(data.excludeValues); }); </script>
限定符和类型 | 字段和说明 |
---|---|
private CmsDictionaryExcludeValueService |
service |
ADVANCED, AUTH_TOKEN, AUTH_USER_ID, siteComponent
log
构造器和说明 |
---|
CmsDictionaryExcludeValueDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler) |
execute, expose, getAdvanced, getApp, getSite, getUserId, needAppToken, needUserToken, supportAdvanced
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
private CmsDictionaryExcludeValueService service
public void execute(RenderHandler handler) throws java.io.IOException, freemarker.template.TemplateException
java.io.IOException
freemarker.template.TemplateException