here's my code to be more clear : In EnvoiFichiers.java : ..... // Client sending files form @Component(id = "sendFilesClientForm") private Form formClient;
// Collaborator sending files form @Component(id = "sendFilesCollaboratorForm") private Form formCollaborator; ..... In EnvoiFichiers.tml : .... <!-- If connected user is a client --> <t:if test="${userConnected.isClient()}"> <fieldset> <legend align="left">${message:sendFiles}</legend> <t:Form id="sendFilesClientForm"> <t:Label t:for="uploadedFilesClient" /> : <input t:type="Upload" t:value="uploadedFilesClient" t:id="uploadedFilesClient" /> <br /> <t:submit value="${message:sendingFiles}" class="button" /> </t:Form> </fieldset> </t:if> <!-- If connected user is a collaborator --> <t:if test="${userConnected.isCollaborator()}"> <fieldset> <legend align="left">${message:sendFiles}</legend> <t:Form id="sendFilesCollaboratorForm"> <t:Label t:for="uploadedFilesCollaborator" /> : <input t:type="Upload" t:value="uploadedFilesCollaborator" t:id="uploadedFilesCollaborator" /> <br /> <br /> ${message:clients} : <table> <tr> <td><t:checkbox t:id="client1" /> Client 1. <br /> <t:checkbox t:id="client2" /> Client 2. <br /></td> </tr> </table> ${message:collaborators} : <table> <tr> <td><t:checkbox t:id="collaborator1" /> Client 1. <br /> <t:checkbox t:id="collaborator2" /> Client 2. <br /></td> </tr> </table> <t:submit value="${message:sendingFiles}" class="button" /> </t:Form> </fieldset> </t:if> ... And when I try to display this page I got : Embedded component(s) sendFilesClientForm, sendFilesCollaboratorForm are defined within component class atos.smt.livraison.pages.EnvoiFichiers (or a super-class of EnvoiFichiers), but are not present in the component template (classpath:atos/smt/livraison/pages/EnvoiFichiers.tml). 2014-07-07 14:13 GMT+02:00 Thiago H de Paula Figueiredo <thiag...@gmail.com> : > On Mon, 07 Jul 2014 05:58:30 -0300, squallmat . <squall...@gmail.com> > wrote: > > I have two t:form embedded components defined in my java class with the >> good ids. >> > > What do you mean by good ids? > > > When I tried to launch that I got this message error : >> "Embedded component(s) sendFilesClientForm, sendFilesCollaboratorForm are >> defined within component class atos.smt.livraison.pages.EnvoiFichiers >> (or a super-class of EnvoiFichiers), but are not present in the component >> template (classpath:atos/smt/livraison/pages/EnvoiFichiers.tml)." >> > > You cannot inject a component declared in a template which isn't its own, > even if this template is the one from a superclass. In other words, page or > class Example can only @InjectComponent components declared inside its > corresponding template (Example.tml). > > > So it seems that embedded components search for the corresponding >> template definition after rendering preparation, >> > > That's 100% incorrect. Tapestry templates have a strictly static > structure. Only rendering is dynamic. > > -- > Thiago H. de Paula Figueiredo > Tapestry, Java and Hibernate consultant and developer > http://machina.com.br > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >