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>

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

Reply via email to