On Fri, Oct 15, 2010 at 11:41 AM, Chuck Kring <cjkr...@pacbell.net> wrote: > Whoa. Everything is easy in Tapestry. The hard part is figuring out the > easy way to do it. > > Howard, if you happen to read this, one thing that would be generally > useful would be to allow t:id to be set using a variable. Something like > this: > > <t:loop source="items" value="item"> > <t:something t:id="${item.identifier}"/> > </t:loop> >
I don't see that as doable; that implies that the structure of the page itself is variable. A component's id, just like its type and parameter bindings, is part of the static structure that is essential to Tapestry's ability to share a single page instance across multiple threads, or share requests across multiple servers in a cluster. Typically, you will use an Environmental object to coordinate an outer component (that pushes an object into the Environment) with an inner component (that pulls the environmental out of the Environment). > Right now you can set the HTML id but not the tapestry id this way. There > have been a number of cases where I wanted to do this. It might have been > useful here. > > Thanks for building a great framework. > > Chuck > > On 10/14/2010 3:05 PM, Howard Lewis Ship wrote: >> >> There isn't a good way to do this. >> >> You could inject the "parameters" as Blocks into your code, then pass >> a List or Map of those Blocks to your component. >> >> It isn't as pretty in the markup. >> >> Alternately, you could have a naming convention, i.e. >> >> <t:parameter name="fooTitle"> ...</t:parameter> >> <t:parameter name="fooContent"> ...</t:parameter> >> <t:parameter name="barTitle"> ...</t:parameter> >> <t:parameter name="barContent"> ...</t:parameter> >> >> >> On Thu, Oct 14, 2010 at 2:29 PM, Chuck Kring<cjkr...@pacbell.net> wrote: >>> >>> Hi everyone, >>> >>> I'm trying to get equanda/accordion to work with a variable set of tabs >>> and >>> contents. The intent is that I want to loop across a list of groups of >>> objects, with each group a tab and each entry in the tab is a Link to a >>> page >>> about the object. Something like this: >>> >>> Group A >>> obj 1 >>> obj 2 >>> obj 3 >>> Group B >>> obj 1 >>> obj 4 >>> >>> For various reasons an accordion will work well for this. >>> >>> This doesn't work but describes what I'd like to do: >>> >>> <div type="equanda/accordion"> >>> <t:loop source="groups" value="group"> >>> <t:parameter id="${panel.title_id}">${panel.title}</t:parameter> >>> <t:parameter id="${panel.content_id}">${panel.content}</t:parameter> >>> </t:loop> >>> </div> >>> >>> Any suggestions? >>> >>> Thanks >>> >>> Chuck Kring >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org