I need to verify whether an optional attribute has been passed or not within my composite component. How can I achieve this?
<composite:interface>
<composite:attribute name="attr1" />
<composite:attribute name="attr2" required="false" /> <!-- means OPTIONAL -->
</composite:interface>
<composite:implementation>
<!-- How I can verify here whether attr2 is present or not whenever this component is used? -->
</composite:implementation>
Setting the default
attribute to xxx
for <composite:attribute>
is not what I'm looking for.
attr2
is empty or not and rendering accordingly. – Conciliatory