I am writing one composite component like a complex inputtext, that requiere a complete form (it will show a search form and one list of results for the user selects one of them).
<composite:implementation>
<div id="#{cc.clientId}" class="#{cc.attrs.styleClass}">
<h:inputText id="txtIdentificador" ...>
<h:graphicImage id="imgIdentificador" ...>
<h:inputText id="txtDescripcion" ...>
<h:form id="formF2ItemWidget">
...
</h:form>
</div>
</composite:implementation>
Logically, I would like to use into other form, but I have problems when I do it. e.g.
<h:form id="formOuter" >
<h:outputLabel value="Texto1" />
<trkal:itemwidget id="txtTexto1">
...
</h:form>
The HTML generated hasn't the inner form (formF2ItemWidget), it only has the form with id=formOuter. But in the below example:
<h:form id="formOuter" >
<h:outputLabel value="Texto1" />
<trkal:itemwidget id="txtTexto1">
<h:outputLabel value="Texto2" />
<trkal:itemwidget id="txtTexto2">
...
</h:form>
The form for txtTexto1 don't exist, but the form for txtTexto2 exists. Why?
How can I write a composite component that include a form without this problem?
I am using mojarra 2.1.7, Java 6.0 y Tomcat 7.0