You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Faneyte, Diego" <di...@wur.nl> on 2004/03/23 13:38:52 UTC
FW: Dynamic components on tabs
Hello,
I am new to Tapestry and I have a question:
How can I place component dynamically on a tab.
This is what I want to do:
There is a tree with some nodes, when I click a node some bean reads a file (of database table), this file describes how many tabs there should be shown and what components should be shown on each of the tabs (Textfields, lists etc). So up front I can't tell which component will be placed where, when or how many. Can someone tell how this can be done in Tapestry.
Regards,
Diego
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: FW: Dynamic components on tabs
Posted by =?...@tiger.tigra.hu,
_S=E1ndor=22?= <ty...@tigra.hu>.
On Tue, 23 Mar 2004 13:38:52 +0100, Faneyte, Diego <di...@wur.nl>
wrote:
> There is a tree with some nodes, when I click a node some bean reads a
> file (of database table), this file describes how many tabs there should
> be shown and what components should be shown on each of the tabs
> (Textfields, lists etc). So up front I can't tell which component will
> be placed where, when or how many. Can someone tell how this can be done
> in Tapestry.
>
> Regards,
> Diego
I would create a component that contains all the possible node descriptor
component. In renderComponent when you have the data bound you can choose
one to call its renderComponent only.
The number of childnodes is no problem: when the datastructure is a
collection the Foreach component can be used.
So you have a Foreach. Its value property should be bound on your selector
component (mentioned above), which will decide on rendering the proper
treenode component.
--
Irlanda, Sándor
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org