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