That should work just fine. Nothing jumps out at me as being wrong. In fact, I just tried a simplified test case and it worked fine:
public Object[][] getData() { return new Object[][] { { "fred", "flintstone" }, { "barney", "rubble" } }; } @Property private Object[] column; <ul> <t:loop source="data" value="column"> <li> ROW: <ul> <t:loop source="column" value="var:temp"> <li>${var:temp}</li> </t:loop> </ul> </li> </t:loop> </ul> Which rendered as: <ul> <li> ROW: <ul> <li>fred</li> <li>flintstone</li> </ul> </li> <li> ROW: <ul> <li>barney</li> <li>rubble</li> </ul> </li> </ul> On Thu, Mar 27, 2008 at 11:24 AM, Britske <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm breaking my head on this one. > I have 2 nested loops where the value of the outer loop is used as the > source of the inner loop. > > The problem is that getCurPhotoAsThumb() is never called (as noticed by > debugging) thus nothing is rendered. > I've made sure that getCurThumbSublist() has at least 1 element. > > Anyone? > > I've supplied the relative template and class-parts: > > TEMPLATE> > --------------------- > <t:loop source="listOfThumbSubLists" value="curThumbSublist"> > <div id="${currentThumbContainerId}" class="thumbcontainer"> > <t:loop source="curThumbSublist" value="curPhotoAsThumb"> > ${curPhotoAsThumb.url} > </t:loop> > </div> > </t:loop> > > > CLASS> > --------------- > private int maxListsize = 6; > private List<Photo> curThumbSublist; > private Photo curPhotoAsThumb; > private int curListCounter = 0; > > public List<Photo> getCurThumbSublist() > { > return curThumbSublist; > } > > public void setCurThumbSublist(List<Photo> curThumbSublist) > { > this.curThumbSublist = curThumbSublist; > curListCounter++; > } > > public String getCurrentThumbContainerId() > { > return "thumb_"+curListCounter; > } > > public List<List<Photo>> getListOfThumbSubLists(){ > curListCounter= 0; > List<List<Photo>> outputlist = new ArrayList<List<Photo>>(); > > Set<Photo> set = this.getPage().getPhotos(); > List<Photo> list = new ArrayList<Photo>(); > for(Photo p: set){ > list.add(p); > System.out.println(p.getUrl()); > } > int counter = 0; > boolean stop = false; > while(!stop){ > outputlist.add(list.subList(counter, > Math.min(counter+maxListsize,outputlist.size()))); > if(list.size()<=counter+maxListsize){ > stop = true; > } > counter += maxListsize; > } > return outputlist; > } > > public Photo getCurPhotoAsThumb() > { > return curPhotoAsThumb; > } > > public void setCurPhotoAsThumb(Photo curPhotoAsThumb) > { > this.curPhotoAsThumb = curPhotoAsThumb; > } > -- > View this message in context: > http://www.nabble.com/T5%3A-nested-loops-don%27t-work-%28can%27t-figure-this-one-out%29-tp16330163p16330163.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]