Separate issues.
For this I'm using the SImple Stupid JQuery Accordion and it's working
well.
The issue that I've run into in the past is that there are cases where
generating Blocks in the page based upon page data and accessing them
(e.g. to pass into a zone) would be useful.
I understand the issues with generating Blocks and using them in
components in the same page.
Chuck
On 10/15/2010 4:41 PM, Josh Canfield wrote:
The use model for this would be to allow Blocks to be dynamically created
in the template then retrieved using ComponentResources.findtBlock().
> From my understanding, adding something like this would be a serious
departure from how tapestry works.
First, in order to create the dynamic blocks that you want to access
with findBlock, you would actually have to render the body of the
component. When would you get a chance to call findBlock? your outer
component calls setuprender, beginrender, beforerendertemplate,
beforerenderbody before the body is actually rendered.
It seems like what you are running into is that your use case is
outside the scope of the component you are trying to use. Accordion
was built to have a static number of panes.
You could build a new component that supports dynamic panes.
Josh
On Fri, Oct 15, 2010 at 3:01 PM, Chuck Kring<cjkr...@pacbell.net> wrote:
Clarification: programatically created with ids specified from the page or
component class, then retrieved using findBlock() or something similar.
On 10/15/2010 2:54 PM, Chuck Kring wrote:
Understood.
The use model for this would be to allow Blocks to be dynamically created
in the template then retrieved using ComponentResources.findtBlock(). I
think findBlock() works off of the Tapestry id which can't be set.
Chuck
On 10/15/2010 11:45 AM, Howard Lewis Ship wrote:
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
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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