One more thing... although Tapestry is component oriented (which is a goood
thing :)), this kind of flexibility (dynamic template generation) which is
available in JSP is an essential feature to be really flexible. A templating
framework should allow this level of redirection, or abstraction, that the
templates are dynamically produced driven by runtime conditions or
configuration. Otherwise we get a very intelligent and elegant HTML (in
terms of this kind of staticness). Sorry for the lengthy arguing, but I
think this issue is vital for Tapestry too (not just me :))

Cheers,
Janos

On 16/04/2008, János Jarecsni <[EMAIL PROTECTED]> wrote:
>
> Yes, I felt this too :) However, this is no special usage scenario I would
> say, just a bit different usage pattern that calls for a different approach.
> As I see now, the Tapestry framework is well suited to sites, where the user
> travels from Login to Browse items from there to Shopping cart and so on.
> This from a.tml to b.tml from b.tml to c.tml.
>
> This approach is somewhat clumsy when it comes to a portal-like scenario
> where there is no longer a "browse items" "page" but rather the user is
> manipulating components (like clicking on a voter component to show the
> results or clicking on a "top 10 news" component to load one news into the
> "workspace area"). Here the notion of a "page" is no longer really
> meaningful. What you have is a few templates (which specify the layout and
> design) and you'd like to manipulate (load and manage state of) components
> dynamically.
>
> I hope I could make my approach clear enough :)
>
> Cheers,
> Janos
>
> On 16/04/2008, Josh Canfield <[EMAIL PROTECTED]> wrote:
> >
> > > My intention is to move away from the page-centric
> > > approach of Tapestry toward this more dynamic strategy
> >
> >
> > :) I think the statement above says it all. When you try to "move
> > away" from the core approach of a framework then you're asking for a
> > challenge.
> >
> > If you don't mind sharing, what's your usecase? Why won't configurable
> > components suite your need? Are you wanting to pull portions of the
> > templates from a database?
> >
> > Josh
> >
> > On Tue, Apr 15, 2008 at 1:43 PM, János Jarecsni
> >
> > <[EMAIL PROTECTED]> wrote:
> > > Hi Josh,
> > >
> > > hm, this would be a pity... it is relatively easy to imagine a
> > scenario
> > > where the component should be "lately bound", I mean resolved only at
> > > runtime. I can imagine generic TMLs which only specify placeholders
> > for
> > > components, and it depends on some configuration what components to
> > link
> > > into those placeholders. My intention is to move away from the
> > page-centric
> > > approach of Tapestry toward this more dynamic strategy, where the page
> > tml
> > > works as a generic template. Hope this is possible somehow... In the
> > worst
> > > case I will compile the TML on the fly using JSP and then forward to
> > > Tapestry? Uh hah :)
> > >
> > > Thanks for the reply!
> > > Janos
> > >
> > >
> > > On 15/04/2008, Josh Canfield <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Tapestry wants to know about all the components that a page is going
> > > > to render up front. If you want to dynamcially include a component
> > > > you'll have to include that component in the template somewhere so
> > > > that you can get a handle to it.
> > > >
> > > > For instance, you can have a component that has:
> > > >
> > > > <t:delegate to="footerBlock"/>
> > > >
> > > > <t:block id="footerWhite">
> > > > <t:myWhiteFooter/>
> > > > </t:block>
> > > >
> > > > <t:block id="footerRed">
> > > > <t:myRedFooter/>
> > > > </t:block>
> > > >
> > > > then in your component class you can implement
> > > >
> > > > @Parameter
> > > > private String _color;
> > > >
> > > > @Inject
> > > > private Block footerWhite;
> > > >
> > > > @Inject
> > > > private Block footerRed;
> > > >
> > > > Block getFooterBlock() {
> > > > if ( _color.equals("white") ) {
> > > >   return footerWhite;
> > > > } else {
> > > >   return footerRed;
> > > > }
> > > >
> > > > I'm don't know of a way to iterate over all the blocks contained in
> > a
> > > > component...
> > > >
> > > > Josh
> > > >
> > > > On Tue, Apr 15, 2008 at 1:10 PM, János Jarecsni
> > > >
> > > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > Hi again,
> > > > >
> > > > > is there a way for a little bit more dynamic inclusion of a
> > component?
> > > > >
> > > > > Say instead of <t:footer/> I'd like to iterate through a registry
> > of
> > > > > components and include some of them in a page, like:
> > > > >
> > > > > <t:include-component t:id="someValue"/> (someValue is not a
> > literal).
> > > > >
> > > > > It would be vital for what I'm up to :)
> > > > >
> > > > >
> > > > > Thanks again
> > > > > Janos
> > > > >
> > > > >
> > > > > On 14/04/2008, Michael Gerzabek <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Then I was to fast too! ;-)
> > > > > >
> > > > > > Michael Gerzabek schrieb:
> > > > > >
> > > > > > > Hi Janos,
> > > > > > >
> > > > > > > Could you elaborate a little bit more on what you wanna do?
> > > > > > >
> > > > > > > Have a look at the basic principles of T5 [1], especially
> > Principle
> > > > #1
> > > > > > > might be of interest for you.
> > > > > > >
> > > > > > > Maybe you are just looking on how create dynamic layouts then
> > go to
> > > > the
> > > > > > > mailing list with keywords dynamic and static [2].
> > > > > > >
> > > > > > > Not sure this helps,
> > > > > > > Michael
> > > > > > >
> > > > > > > [1] http://tapestry.apache.org/tapestry5/
> > > > > > > [2]
> > > > > > >
> > > >
> > http://www.nabble.com/forum/Search.jtp?query=T5+static+dynamic&local=y&forum=340&daterange=0&startdate=&enddate=
> > > > > > >
> > > > > > >
> > > > > > > János Jarecsni schrieb:
> > > > > > >
> > > > > > > > Hi All,
> > > > > > > >
> > > > > > > > I'm new to Tapestry technology and to this mailing list, and
> > I
> > > > have a
> > > > > > > > question. I'd like to "dynamically" create .TMLs... So
> > instead of
> > > > > > > > having
> > > > > > > > static pages (Start.tml, Login.tml), I'd like to construct
> > > > Tapestry
> > > > > > > > pages on
> > > > > > > > the fly (by including page parts, which are other .tmls).
> > I've
> > > > been
> > > > > > > > looking
> > > > > > > > for some "include" component whatsoever, but found nothing.
> > Except
> > > > for
> > > > > > > > the
> > > > > > > > PageLayout component, which does something similar, just the
> > other
> > > > way
> > > > > > > > around. Could you point me to some workaround or existing
> > > > solution?
> > > > > > > >
> > > > > > > > Cheers
> > > > > > > > Janos
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > 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]
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > --
> > > > TheDailyTube.com. Sign up and get the best new videos on the
> > internet
> > > > delivered fresh to your inbox.
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> >
> >
> >
> >
> > --
> >
> > --
> > TheDailyTube.com. Sign up and get the best new videos on the internet
> > delivered fresh to your inbox.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

Reply via email to