The Java – freemaker template checks whether the sequence is empty
•
Java
I want to check whether the sequence is empty in the freemaker template
This fragment is used to check whether the sequence contains values:
<#if node.attachments?seq_contains("blue")> <pre>hello</pre> </#if>
However, if node Attachments is empty. I want to do something else
Is that the grammar of this?
Solution
This job
< #if node. attachments? size!= 0>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码