Hi again,

also forgot to mention great source to learn from:
http://jumpstart.doublenegative.com.au:8080/jumpstart/

(http://jumpstart.doublenegative.com.au/home.html)

 - Ville


Steven Tönsing wrote:
> 
> Hi,
> i'm completely new to tapestry and i got a very fundamental (for my  
> project) question.
> 
> So this is my sitiation :
> I'm using tapestry 5.1 and i have a collection of components (Boxes)  
> which can be placed on a page (in a certain order) the only thing i  
> whant to do now is to get this collection of components rendered in  
> the markup (template) of the page.
> 
> Pretty much like this
> 
> <t:loop source="boxes" value="var:whatever">
>       <t:box source="var:whatever">
> </t:loop>
> 
> but this is obviously wrong. Is there a way to do so ?
> 
> thanks,
> steve
> 
> Structure :
> 
> de.steven.tapestry.components.Box.java
> de.steven.tapestry.components.Box.tml
> 
> de.steven.tapestry.pages.Overwiew.java
> de.steven.tapestry.pages.Overwiew.tml
> 
> Source :
> 
> de.steven.tapestry.pages.Overview.java
> 
> public class Overview{
> 
>       private List<Box> boxes;
> 
>       public Overview(){
>               boxes = new ArrayList<Box>();
>       
>               System.out.println("creating some boxes");
>               boxes.add( new Box("box 1") );
>               boxes.add( new Box("box 2") );
>               boxes.add( new Box("box 3") );
>               boxes.add( new Box("box 4") );
>       }
> 
>       public List<Box> getBoxes() {
>               return boxes;
>       }
> 
>       public void setBoxes(List<Box> boxes) {
>               this.boxes = boxes;
>       }
> 
> }
> 
> de.steven.tapestry.compoents.Box.java
> 
> public class Box {
>       @Parameter
>       @Property
>       private String name = "noname";
> 
>       public Box(){
>               
>       }
>       
>       public Box(String name){
>               this.name = name;
>       }
> }
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/collection-of-components-within-a-page-%28Tapestry-5.1%29-tp26623064p26629675.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to