The approach I would use is to use Block/RenderBlock.  You use some kind of
table ot map from objects to the names of Blocks used to render the object
(check out the AdaptorRepository class).



----- Original Message -----
From: "Pablo I. Lalloni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 26, 2002 4:19 AM
Subject: [Tapestry-developer] dynamic component selection


> I am working on an generic CRUD component for Tapestry.
>
> For this component to work you have to supply it with an "access
> delegate" which is responsable for the basic CRUD operations on the
> dataset and also responsable for providing the actual data (as a List
> of Object) to be rendered by the component.
>
> Now I face the problem of rendering the List in the page.
>
> My first thinking was about some way of registering "renderers" for
> classes, so the G-CRUD component would find a renderer component for
> the class X and put it on the response for rendering the n-object from
> the list. This renderer components should have all an "object"
> parameter which should be binded to the object to be rendered.
>
> I see that at least 2 kind of renderers are posible, one that shows
> (represents) an object in some readable way on the client's browser
> and one that represent the object in an editable way (with an HTML
> FORM).
>
> The first problem I see here is how to dinamically put a component on
> a Tapestry page?
> I don't see how this can be done... please someone that knows how to
> do this tell me.
>
> One solution I thought was to make a kind of delegator component that
> can wrap another component which can be changed at runtime using some
> parameter of the delegator... very much like the "Delegator" component
> provided with Tap but instead of giving it an IRender you provide it
> with a Component alias to be rendered... I don't know if this is
> posible or how it could be done.
>
>
> --
> Saludos,
>  Pablo                          mailto:[EMAIL PROTECTED]
>
> "The only thing that interferes with my learning is my education."
> Albert Einstein
>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to