[prev in list] [next in list] [prev in thread] [next in thread]
List: tapestry-user
Subject: Re: Programmatically generating DirectLinks with updateComponents
From: "Andreas Andreou" <andreoua () gmail ! com>
Date: 2007-12-22 22:30:10
Message-ID: 745369620712221430v28cd7a7t872deebc64c977ba () mail ! gmail ! com
[Download RAW message or body]
Hi,
what's the html template for
ResultElement ?
Can't you add the link there?
On Dec 22, 2007 11:48 PM, Kaspar Fischer <fischerk@inf.ethz.ch> wrote:
> On 21.12.2007, at 19:29, Kaspar Fischer wrote:
>
> > Hi,
> >
> > My custom component needs to emit in its renderComponent() method
> > several
> > DirectLink with updateComponents information. That is, I need to
> > output the
> > same HTML as
> >
> > <a jwcid="@DirectLink" listener="listener:doClick"
> > updateComponents="result"></a>
> >
> > generates non-programmatically, but from within renderComponent().
> > How can
> > I do this?
> >
> > Thanks,
> > Kaspar
>
> To give a concrete example: I tried to do it as follows:
>
> <div jwcid="@Block">
> <a jwcid="link@DirectLink" listener="listener:showResult"
> updateComponents="result"></a>
> </div>
>
> <div jwcid="@ResultElement" tree="ognl:mydate"/>
>
> <div jwcid="result@Block">
> <div jwcid="@Insert" value="ognl:result"></div>
> div>
>
> ... and from the code (ResultElement's renderComponent()) I try to
> render the link as follows:
>
> DirectLink link = (DirectLink)this.getContainer().getComponent
> ("link");
> String url = link.getLink(cycle).getURL();
> writer.begin("a");
> writer.appendAttribute("href", url);
> writer.print(title);
> writer.end();
>
> Unfortunately, this only outputs an ordinary link, not an AJAX link!
>
> Any ideas how to output a AJAX link programmatically?
>
>
> Thanks,
> Kaspar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
---------------------------------------------------------------------
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