This is done on purpose so that you can have blocks fill in value placeholders at several locations in your template. Everything is global in a RIFE template, there's no scoping of values within blocks. To do this iteration, you simply clear the v1 value in the beginning of the second for loop with for instance template.blankValue("v1")
HTH, Geert On 31 Mar 2009, at 15:10, michaelCH wrote: > > Hello Geert! > > I would like to describe my problem with nested blocks and value > holders. > > When I have such a iteration of items: > > for(item: itemList) { > for(tag: tagList) { > template.setValue("v1", "text1"); > template.appendBlock("b1", block1"); > } > template.setBlock("b2", "block2"); > } > > Value holder b1 and are inside block2 in the template. > In my case the problem is that block1 appears in all items in not only > in one item as i would excpect. I thought that template.setBlock > ("b2", "block2") "close" the place holder "b1" and next taglist will > not have taglist from previous item. It mean the place holder is > "global" for the template in case we use nested blocks ? > > It would be very helpful if you could suggest another solution for it. > I guess it typicall issue when you start to use nested blocks. -- Geert Bevin Terracotta - http://www.terracotta.org Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Flytecase Band - http://flytecase.be Music and words - http://gbevin.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "rife-users" group. To post to this group, send email to rife-users@googlegroups.com To unsubscribe from this group, send email to rife-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rife-users?hl=en -~----------~----~----~----~------~----~------~--~---