(Quick Reference)
ui:attributes
Purpose
Writes out a map of HTML attributes cleanly, with option to specify a list of attribute names to include and exclude.
Used in UI templates to cleanly output attributes passed in to UI tags.
Example
<p class="bodytext" ${ui.attributes(from:attrs, exclude:'class')}>
${bodyContent}
</fieldset>
Attributes
Name | Required? | Description |
---|
from | No | A map of attributes to render. If not specified, defaults to "attrs" variable from the current model. |
include | No | A set of attribute names or comma delimited string list of names to include. Anything not in this set will be excluded. Default is to include all. |
exclude | No | A set of attribute names or comma delimited string list of names to exclude. Anything not in this set will be included, provided it passes the include rule. |