[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Rendering a component from it's name
From:       Alexander Lamb <alexander.lamb () rodanotech ! ch>
Date:       2007-12-20 10:50:18
Message-ID: B6F1AB25-BB89-43D3-B979-DD55A06812A5 () rodanotech ! ch
[Download RAW message or body]

Hello,

I would like to render a component that would be chosen from it's name  
(a String).

Something like:

<t:Delegate to="myComponentName" param1="..." param2="..." />

In the enclosing component I would have:

public String getMyComponentName()

Which returns the name of a component in my project. It would be  
instantiated and the parameters (param1, etc...) would be passed to it.

I would allow to build a page dynamically from data found in a  
database for example:

- if it's a string, put the TextField component, if it's a "choice",  
put the Select component, if it's a xyz, put MySpecialComponent.

I thought it would be possible with Delegate, but I am afraid I didn't  
understand well how to achieve this.

Thanks,

Alex

--
Alexander Lamb
Founding Associate
RODANOTECH Sàrl

4 ch. de la Tour de Champel
1206 Geneva
Switzerland

Tel:  022 347 77 37
Fax: 022 347 77 38

http://www.rodanotech.ch




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic