RE: first flag variable for request cycle loop

2012-10-08 Thread Ken in Nashua
Ok guys... this thread went off the track... i got the outer loop by design I will give the inner loop a try but i swear I had problems before in T4 I tried to avoid. I dont like hakcs like a firstFlag solution so I will give that inner loop a try and let you know how I make out @Property

RE: first flag variable for request cycle loop

2012-10-08 Thread Ken in Nashua
Alright, your correct... I will take a closer look. And thank you for the constrictive criticism. I prefer to do things the right-way... kinda pressed for time kcola...@live.com From: kcola...@live.com To: users@tapestry.apache.org Subject: first flag variable for request cycle loop Date: Mo

Re: first flag variable for request cycle loop

2012-10-08 Thread Howard Lewis Ship
On Mon, Oct 8, 2012 at 8:27 AM, Ken in Nashua wrote: > > Thanks for trying Lance... > > i am re-writing a gallery widget. its all custom table... I cannot abstract > it like your suggesting. > > its custom Which reads to me like "I don't understand how it works, and I can't be bothered to unders

Re: first flag variable for request cycle loop

2012-10-08 Thread Howard Lewis Ship
This is the approach I take ... use the Java code to massage the data from the shape that makes sense for external storage (or whatever the API is), into the shape that make sense for rendering. It helps that you can just use inner classes of your page/component class, with public fields, so it's

RE: first flag variable for request cycle loop

2012-10-08 Thread Lance Java
Nabble ate my post: So, you could write a getter like this: public List> getGrid() { ... } Then your TML could look something like [table] [t:loop source="grid" value="row"] [tr] [t:loop source="row" value="asset"] [td][img src="${asset}" /][/td] [/t:lo

RE: first flag variable for request cycle loop

2012-10-08 Thread Lance Java
So, you could write a getter like this: public List> getGrid() { ... } Then your TML could look something like <${asset}> -- View this message in context: http://tapestry.1045711.n5.nabble.com/first-flag-variable-for-request-c

RE: first flag variable for request cycle loop

2012-10-08 Thread Ken in Nashua
Thanks for trying Lance... i am re-writing a gallery widget. its all custom table... I cannot abstract it like your suggesting. its custom kcola...@live.com From: kcola...@live.com To: users@tapestry.apache.org Subject: first flag variable for request cycle loop Date: Mon, 8 Oct 2012 10:

Re: first flag variable for request cycle loop

2012-10-08 Thread Lance Java
It sounds like your data model doesn't exactly map to your UI and you are doing some complex logic in a TML template to split your data into visual groups (tables). I think you should do that work in the java class instead of the template. Write a method which converts your data model into a list o