i have a custom tag and want to allow to set the id of an inner element
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
<f:subview rendered="#{not empty id}">
<h:message styleClass="message" id="#{id}" errorClass="message error"
warnClass="message warn" for="#{element}" />
</f:subview>
<f:subview rendered="#{not id}">
<h:message styleClass="message" errorClass="message error"
warnClass="message warn" for="#{element}" />
</f:subview>
</html>
but i always get
Empty id attribute is not allowed
how can i archieve that when the user sets an id it is used, and when not jsf should generate it by its own