I'm new in Java Web, and I'm just learning english... I have multiples composite component, that works fine, like, for example, this code
<composite:interface>
<composite:attribute name="usernameValue" />
</composite:interface>
<composite:implementation>
<h:form>
<h:outputText id="username" value="#{cc.attrs.usernameValue}" />
</h:form>
When I need to use this component, I just do:
<myComposite:myComponent usernameValue="My user name value"/>
this works ok.
But, how to do if I need put more components inside this previously created component, like:
<h:form>
<h:outputText id="username" value="My text 1" />
<p:commandButton value="New button 2"/>
<p:commandButton value="New button 3"/>
<p:commandButton value="New button 4"/>
<h:form/>
Is there any way to do something like:
<myComposite:myComponent usernameValue="This will render default inside composite output text">
<p:commandButton value="New button 1 to render inside my composite"/>
<p:commandButton value="New button 2 to render inside my composite"/>
<p:commandButton value="New button 3 to render inside my composite"/>
<myComposite:myComponent/>
I'm learning, and this time I recreate all composite that I need to use with attribute render="true or false"
according the components that I will use, but this is like XGH.
Sorry for my english, I know that i need to improve it...
Thanks in advance...