I agree with Richard; the OP's problem isn't that Tapestry doesn't
support or use components, it's that he can't dynamically alter the
component tree. It's rather like claiming that my laptop's CPU doesn't use
transistors because I can't change them after it comes out of the FAB plant
:).

        As to his underling objection though, it irritates me from time to
time as well. It used to irritate me a lot, because I tried to treat
tapestry like a windows gui and wanted to program it as such. Eventually I
sort of settled down to doing things more the "tapestry" way and just used
very large component trees that were hidden/unhidden as per circumstance.
        
        The main area where I still find myself noticing this limitation
though is when I've got a component that renders itself via java. This
component pretty much can't embed other components. Thus, for example, I
have a customer grid control that put's selection links on each row so you
can select an item. That particular link has to be rendered by java code
calling the direct service to construct a link, then HTMLWriter to spit out
the appropriate anchor tag. It would have been about 10 times easier if I
could have just gone:

        DirectLink link = new DirectLink();
        link.setTargetComponent(this);
        Object[] args = { foo, bar };
        Link.setArgs(args);
        Writer.printComponent(link);

        As it is I've got much nastier looking code that a future
maintenance programmer is going to hate because it's non obvious despite all
my comments. The above though, is pretty obvious e.g. I'm inserting a
directlink into the output stream.

        In any event, we've all had this discussion before, and I'll be
among the first to admit that the Architecture of tapestry is such that the
kind of changes I'd like to see are probably not plausible. All the same, if
I had my magic wand of framework enhancement, this is one of the areas where
I'd wave it.

        --- Pat

> However, I suspect that you want to create components on the fly, and
> you are right, Tapestry does not do this. Components (and pages) are
> statically defined, but dynamic in execution (e.g. using conditionals,
> and runtime determination of Blocks to render, but all the Blocks must
> be predefined). You can choose to say that Tapestry is not really
> component based because of this lack of feature if you like, others may
> disagree.
> 
> Cheers
> 
> Richard
> 
> 
> ---------------------------------------------------------------------
> 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