我需要验证我的复合组件中是否传递了可选属性。我怎样才能做到这一点?
<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>
将default
属性设置为xxx
for<composite:attribute>
不是我想要的。