Hi Robert

Robert Zeigler schrieb:

Yes... but you don't need to use dynamically added components to accomplish that. You can accomplish it using a static structure, including direct links. Or, your "tree" component implements the "IDirect" interface. Then it generates the urls needed, and provides the necessary listener and gets called-back automatically by the

I *think* this was about my solution, only uglier . Today I am afraid to look at that code again, it might create a black hole :)

direct service. I think there are some pretty good reasons to keep the component tree static. For one thing, page objects are very expensive to create, which necessitates (the oft maligned) page pooling. However, because you are pooling the pages, the component tree MUST be static,

Good point. Perhaps It would be possible to have page marked as "dirty" as soon as the component tree has changed? In my example, this would be only the case when e.g. a new folder has been defined.

because you can't guarantee that the same page instance will be used the /next/ time the page is rendered. There may be ways around that, but generally, I've found that anything you might think of solving by using dynamic components can be solved as well or better by some other method which
tapestry /does/ provide.

Agreed. My point is just that Tapestry main lession is "thinking in components". Therefore the notion of beeing able to create components on the fly is just a natural way to think in Tapestry.

(That said, I won't deny wishing for being able to add components at runtime on occasion. :)

You could also compare this to standard GUI programming: 90% of the GUIs are static, maybe 5% are user-customized and another 5% allow minor additions/removals

Robert

Tapestry wrote:

It's been a while since I played around with tapestry, but I came to a point where I wanted components to be dynamically generated.

Take this as example: You create a email-frontend, and want to display the possible folders in a tree structure. The folder structure is a priori different for each user, i.e. it is dynamic. It is evident, that those folders are represented by a DirectLink, which displays the respective messages.

I am sure that there is a possibility to do this today (I got it running somehow, but don't ask me how). But the Tapestry spirit tells me, that there should be a component (the tree structure), which manages to generate the DirectLinks on the fly.

Does this make sense?

Cheers

cs.

Mark Stang schrieb:

Can you be more specific about how you want to "instantiating components directly". I am just trying to understand the definition. Do you want to "draw" a page on the fly? Taking components and re-arranging them on the page or on a new page? Or creating components that don't exist at the start of the server but they do later?

thanks,

Mark


-----Original Message-----
From: Jorge Quiroga [mailto:[EMAIL PROTECTED]
Sent: Thu 1/12/2006 9:58 AM
To: Tapestry users
Subject: Re: instantiating components directly

This issue about dynamic component generation should be considered seriously for the next major release, because is very necessary and asked by the community, after all, if almost all are components it should be possible (if ASP.NET and others can, why not tapestry?).

I'm newbie with T4, and that T4 cannot do it has been very annoying and for some cases (specially when navigation is defined by state) I have to choose the less simpler path, and the most simple is one of the claimed policies in Tapestry, of course T4 isn`t a web panacea, but this is a really community need.

Thanks.

JQ


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to