Hello Udo, Sorry, i forget to list the important libraries in use:
avalon-framework-4.1.3.jar tobago-core-1.0.24.jar jstl-1.1.0.jar myfaces-impl-1.1.7.jar myfaces-api-1.1.7.jar commons-el-1.0.jar standard-1.1.2.jar Thank you. -----Ursprüngliche Nachricht----- Von: Abushammala, Hani (EXTERN: FTP) [mailto:[email protected]] Gesendet: Mittwoch, 26. Mai 2010 15:12 An: MyFaces Discussion Betreff: AW: [Tobago] foreach in c:sheet Hello Udo, I want to add a dynamic panel to a column, which has many elements for each row in the sheet, that means the content of the panel for each row is different (like sheet in sheet). I could do it with programming of whole panel in java and binding it in the jsp, but i am looking now for a different way. I've tried to use jstl, but it doesn`t work to render the right dynamic panel for right row: <tc:column sortable="false" align="left"> <tc:panel id="headPanel" > <c:forEach items="${myBean.list}" var="x" varStatus="status1"> <tc:panel id="subPanel${x.nr}" rendered="${status1.index} == ${x.nr}" > <c:forEach items="${x.subList}" var="w" varStatus="status2" > <tc:link image="${w.iconUrl}" id="link_${x.nr}_${w.nr}" /> </c:forEach> </tc:panel> </c:forEach> </tc:panel> </tc:column> I've used jstl 1.1. Thank you. -----Ursprüngliche Nachricht----- Von: Udo Schnurpfeil [mailto:[email protected]] Gesendet: Dienstag, 25. Mai 2010 09:16 An: [email protected] Betreff: Re: [Tobago] foreach in c:sheet Hello Hani, I've never tried to use <c:set>, so I have no experience with that tag. Your code will not work, because the content inside of the <tc:sheet> will be visited only one time. The JSTL Tag needs to be called in each row to make it work. Mixing JSTL and JSF and use of iterators have some drawbacks. This depends also on the version of the libraries. Which version you are using? You may try to make your data accessible via the var-attribute of the sheet: <tc:sheet var="row" ...> ... <tc:column <tc:out value="#{row.subListAsString}" /> </tc:column> ... </tc:sheet> Regards, Udo Am 20.05.10 16:39, schrieb Abushammala, Hani (EXTERN: FTP): > Hello, > > We want to visualize some dynamic content within a column for each row > of sheet with jstl. > > > We tried to incrment a variable (defined outside of the tc:sheet > element) with:<c:set var="counter" value="${counter + 1}" /> to get > the row index, but it doesn't work. > > Jsp: > > <tc:sheet ..> > > ... > <tc:column > > <c:set var="counter" value="${counter + 1}" /> > > <c:forEach items="${bean.itmesList[counter].subList}" > var="w" varStatus="status"> > <tc:out value="${w}" /> > </c:forEach> > > </tc:column> > ... > > </tc:sheet> > > > > > Is it possible and how? > > > Thank you. > >

