Tests if there is a service attribute with the specified name attached to the specified element. (See also "What are Service Attributes?" below.)

In most cases, this function returns the same result as the expression:


getServiceAttr(element, attrName) != null
However, it will work faster and, since null can also be a value of service attributes, the function provides the only way to know for sure if a service attribute with a particular name has been associated with a particular element.

Parameters:

element

The element whose service attribute is requested. If not specified, the generator context element is assumed by default, which is the same as the call: hasServiceAttr(contextElement, attrName)
attrName
The name of the requested service attribute.

Returns:

true, if a service attribute with the specified name is associated with the specified element; false, otherwise.

See Also:

getServiceAttr(), setServiceAttr()

${include ../../../refs/service_attrs.htm}