I have the following composite component:
You can use JSTL to build the view conditionally and to specify an attribute separately:
An alternative is to specify a default for the composite component attribute: