You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by ga...@inextdot.com on 2006/10/25 08:24:47 UTC
Creating DirectLink using DirectService
Hi,
I want to create DirectLink programmatically i.e. not using html template. I guess i should use DirectService to construct link etc.
passing parameters with DirectServiceParameter etc.
But how can i pass the right Listener ?
gant
Re: Creating DirectLink using DirectService
Posted by Karthik N <ka...@gmail.com>.
out of sheer curiosity. when you programmatically create the direct link,
how will you also create the associated HTML for the anchor tag, and bind
that HTML to the DirectLink created?
Can you post your code snippet once done, please?
Re: Creating DirectLink using DirectService
Posted by andyhot <an...@di.uoa.gr>.
ok, without listeners:
- Implement IDirect,
- Use
DirectServiceParameter dsp = *new* DirectServiceParameter(*this*, new
Object[]{"a custom param"});
and pass it to DirectService
- When the link is clicked, your*
public* *void* trigger(IRequestCycle cycle) will get called
gant@inextdot.com wrote:
> but when i don't have this binding i.e. there is no html file
> whatsoever, how can i bind the listener?
>
> I am dynamically creating DirectLink there is only java, no html.
>
>
> ----- Original Message ----- From: "andyhot" <an...@di.uoa.gr>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Wednesday, October 25, 2006 3:42 PM
> Subject: Re: Creating DirectLink using DirectService
>
>
>> IIRC, a listener is really an instance of
>> org.apache.tapestry.IActionListener
>>
>> Tapestry (automagically) creates instances of that interface that invoke
>> the corresponding component method
>> (when using the listener: binding).
>>
>> You can dig for more at:
>> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/listener/
>>
>>
>>
>> gant@inextdot.com wrote:
>>> Hi,
>>>
>>> I want to create DirectLink programmatically i.e. not using html
>>> template. I guess i should use DirectService to construct link etc.
>>> passing parameters with DirectServiceParameter etc.
>>>
>>> But how can i pass the right Listener ?
>>>
>>> gant
>>>
>>
>>
>> --
>> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
>> Tapestry / Tacos developer
>> Open Source / J2EE Consulting
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> 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://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Creating DirectLink using DirectService
Posted by ga...@inextdot.com.
but when i don't have this binding i.e. there is no html file whatsoever,
how can i bind the listener?
I am dynamically creating DirectLink there is only java, no html.
----- Original Message -----
From: "andyhot" <an...@di.uoa.gr>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Wednesday, October 25, 2006 3:42 PM
Subject: Re: Creating DirectLink using DirectService
> IIRC, a listener is really an instance of
> org.apache.tapestry.IActionListener
>
> Tapestry (automagically) creates instances of that interface that invoke
> the corresponding component method
> (when using the listener: binding).
>
> You can dig for more at:
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/listener/
>
>
> gant@inextdot.com wrote:
>> Hi,
>>
>> I want to create DirectLink programmatically i.e. not using html
>> template. I guess i should use DirectService to construct link etc.
>> passing parameters with DirectServiceParameter etc.
>>
>> But how can i pass the right Listener ?
>>
>> gant
>>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Creating DirectLink using DirectService
Posted by andyhot <an...@di.uoa.gr>.
IIRC, a listener is really an instance of
org.apache.tapestry.IActionListener
Tapestry (automagically) creates instances of that interface that invoke
the corresponding component method
(when using the listener: binding).
You can dig for more at:
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/listener/
gant@inextdot.com wrote:
> Hi,
>
> I want to create DirectLink programmatically i.e. not using html template. I guess i should use DirectService to construct link etc.
> passing parameters with DirectServiceParameter etc.
>
> But how can i pass the right Listener ?
>
> gant
>
--
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org