netui:attribute Tag

<netui:attribute> Tag

Adds an attribute to the parent tag when it is rendered in the browser.

Syntax

<netui:attribute
    name="string_name"
    value="string_or_expression_value" />

Description

Adds an attribute to the parent tag when it is rendered in the browser.

The following <netui:attribute> tags are rendered within the <span> tag (since the <netui:label> tag is rendered as a <span> tag in the browser.

     <netui:label value="Some Text">
          <netui:attribute name="a" value="aVal" />
          <netui:attribute name="b" value="bVal" />
          <netui:attribute name="c" value="cVal" />
      </netui:label>

The HTML rendered in the browser appears as follows.

    <span a="aVal" b="bVal" c="cVal">Some Text</span>
Note that the value attribute can be dynamically determined using a databinding expression.
    <netui:attribute name="a" value="{pageFlow.aAttributeValue}" />

Attributes

nameThe name of the attribute to add to the parent tag.
 
RequiredSupports runtime expression evaluationData bindable
YesYesNo

valueThe value of the attribute to add to the parent tag.
 
RequiredSupports runtime expression evaluationData bindable
YesYesYes

Related Topics

<netui:parameter> Tag