Class MassAttribute

The <o:massAttribute> sets an attribute of the given name and value on all nested components,
if they don't already have an attribute set. On boolean attributes like disabled, readonly
and rendered, any literal (static) attribute value will be ignored and overridden. Only if they have
already a value expression #{...} as attribute value, then it won't be overridden. This is a technical
limitation specifically for boolean attributes as they don't default to null.

will only set the styleClass="#{component.valid ? '' : 'error'}" attribute in input1 as
that's the only component on which the attribute is absent.
Do note that the specified EL expression will actually be evaluated on a per-component basis.

To target a specific component (super)class, use the target attribute. The example below skips labels
(as that would otherwise fail in the example below because they don't have the valid property):