You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ka...@materna.de on 2007/07/30 08:02:32 UTC

T4: Adding a listener to a link that has not been rendered in tapestry

I wrote a component which shows some html from an external source. This html may contain some links. If one of this links is clicked I need to call a listener to set some parameters, but I don't know how to trigger the listener in this case.

Please help.

Kay Thielmann
Mitarbeiter / BC Government Themen
Business Unit Information
______________________________________________
MATERNA GmbH Information & Communications
Voßkuhle 37 * 44141 Dortmund * Deutschland
Tel.: +49 231 5599-8297>
kay.thielmann@materna.de * www.materna.de
Hauptsitz der MATERNA GmbH: Voßkuhle 37, 44141 Dortmund
Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph Hartwig
Amtsgericht Dortmund HRB 5839


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


AW: T4: Adding a listener to a link that has not been rendered in tapestry

Posted by Ka...@materna.de.
Thanks so far. In my freemarker-templates I wrote the links as if they would have been renderered by DirectLink. Now Tapestry uses the trigger() Methode of the Direct Interface. No real nice solution, but it works.

-----Ursprüngliche Nachricht-----
Von: Marcus.Schulte@bmw.ch [mailto:Marcus.Schulte@bmw.ch]
Gesendet: Montag, 30. Juli 2007 10:08
An: users@tapestry.apache.org
Betreff: RE: T4: Adding a listener to a link that has not been rendered
in tapestry


depends on how much control over the "external links" you do have.
If you can control their generation, you can do anything ;).
hard to say, without a more concrete knowledge of what these links should do,
why they cannot be generated by tapestry and what they may be allowed to know
about tapestry.
DirectService, as all services has a method to generate links to call it. So, if you can
call this, you're fine

> -----Original Message-----
> From: Kay.Thielmann@materna.de [mailto:Kay.Thielmann@materna.de] 
> Sent: Monday, July 30, 2007 9:09 AM
> To: users@tapestry.apache.org
> Subject: RE: T4: Adding a listener to a link that has not 
> been rendered in tapestry
> 
> We are using Tapestry 4.02 in a portal environment. So using 
> AJAX or javascript (even so it may not be barrier-free) is 
> not so easy. I thought about something like writing my own 
> service or subclassing DirectService, or something like that...
> 
> Any suggestions?
> 
> -----Ursprüngliche Nachricht-----
> Von: Marcus.Schulte@bmw.ch [mailto:Marcus.Schulte@bmw.ch]
> Gesendet: Montag, 30. Juli 2007 08:54
> An: users@tapestry.apache.org
> Betreff: RE: T4: Adding a listener to a link that has not 
> been rendered in tapestry
> 
> 
> you could use the EventListener mechanism to intercept the 
> clicks, see 
> http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html
> If you know the link-id's in advance, it's particularly easy.
> If you don't have control over the "external" links, you'll 
> have to come up with some javascript delegating the onclick 
> events to a single element controlled by tapestry which you 
> can then intercept.
> 
> > -----Original Message-----
> > From: Kay.Thielmann@materna.de [mailto:Kay.Thielmann@materna.de]
> > Sent: Monday, July 30, 2007 8:03 AM
> > To: users@tapestry.apache.org
> > Subject: T4: Adding a listener to a link that has not been 
> rendered in 
> > tapestry
> > 
> > I wrote a component which shows some html from an external source. 
> > This html may contain some links. If one of this links is clicked I 
> > need to call a listener to set some parameters, but I don't 
> know how 
> > to trigger the listener in this case.
> > 
> > Please help.
> > 
> > Kay Thielmann
> > Mitarbeiter / BC Government Themen
> > Business Unit Information
> > ______________________________________________
> > MATERNA GmbH Information & Communications Voßkuhle 37 * 
> 44141 Dortmund 
> > * Deutschland
> > Tel.: +49 231 5599-8297>
> > kay.thielmann@materna.de * www.materna.de Hauptsitz der 
> MATERNA GmbH: 
> > Voßkuhle 37, 44141 Dortmund
> > Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph 
> > Hartwig Amtsgericht Dortmund HRB 5839
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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
> 
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: T4: Adding a listener to a link that has not been rendered in tapestry

Posted by Ma...@bmw.ch.
depends on how much control over the "external links" you do have.
If you can control their generation, you can do anything ;).
hard to say, without a more concrete knowledge of what these links should do,
why they cannot be generated by tapestry and what they may be allowed to know
about tapestry.
DirectService, as all services has a method to generate links to call it. So, if you can
call this, you're fine

> -----Original Message-----
> From: Kay.Thielmann@materna.de [mailto:Kay.Thielmann@materna.de] 
> Sent: Monday, July 30, 2007 9:09 AM
> To: users@tapestry.apache.org
> Subject: RE: T4: Adding a listener to a link that has not 
> been rendered in tapestry
> 
> We are using Tapestry 4.02 in a portal environment. So using 
> AJAX or javascript (even so it may not be barrier-free) is 
> not so easy. I thought about something like writing my own 
> service or subclassing DirectService, or something like that...
> 
> Any suggestions?
> 
> -----Ursprüngliche Nachricht-----
> Von: Marcus.Schulte@bmw.ch [mailto:Marcus.Schulte@bmw.ch]
> Gesendet: Montag, 30. Juli 2007 08:54
> An: users@tapestry.apache.org
> Betreff: RE: T4: Adding a listener to a link that has not 
> been rendered in tapestry
> 
> 
> you could use the EventListener mechanism to intercept the 
> clicks, see 
> http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html
> If you know the link-id's in advance, it's particularly easy.
> If you don't have control over the "external" links, you'll 
> have to come up with some javascript delegating the onclick 
> events to a single element controlled by tapestry which you 
> can then intercept.
> 
> > -----Original Message-----
> > From: Kay.Thielmann@materna.de [mailto:Kay.Thielmann@materna.de]
> > Sent: Monday, July 30, 2007 8:03 AM
> > To: users@tapestry.apache.org
> > Subject: T4: Adding a listener to a link that has not been 
> rendered in 
> > tapestry
> > 
> > I wrote a component which shows some html from an external source. 
> > This html may contain some links. If one of this links is clicked I 
> > need to call a listener to set some parameters, but I don't 
> know how 
> > to trigger the listener in this case.
> > 
> > Please help.
> > 
> > Kay Thielmann
> > Mitarbeiter / BC Government Themen
> > Business Unit Information
> > ______________________________________________
> > MATERNA GmbH Information & Communications Voßkuhle 37 * 
> 44141 Dortmund 
> > * Deutschland
> > Tel.: +49 231 5599-8297>
> > kay.thielmann@materna.de * www.materna.de Hauptsitz der 
> MATERNA GmbH: 
> > Voßkuhle 37, 44141 Dortmund
> > Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, Ralph 
> > Hartwig Amtsgericht Dortmund HRB 5839
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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
> 
> 
> ---------------------------------------------------------------------
> 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: T4: Adding a listener to a link that has not been rendered in tapestry

Posted by Ka...@materna.de.
We are using Tapestry 4.02 in a portal environment. So using AJAX or javascript (even so it may not be barrier-free) is not so easy. I thought about something like writing my own service or subclassing DirectService, or something like that...

Any suggestions?

-----Ursprüngliche Nachricht-----
Von: Marcus.Schulte@bmw.ch [mailto:Marcus.Schulte@bmw.ch]
Gesendet: Montag, 30. Juli 2007 08:54
An: users@tapestry.apache.org
Betreff: RE: T4: Adding a listener to a link that has not been rendered
in tapestry


you could use the EventListener mechanism to intercept the clicks, 
see http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html
If you know the link-id's in advance, it's particularly easy.
If you don't have control over the "external" links, you'll have to
come up with some javascript delegating the onclick events to a single
element controlled by tapestry which you can then intercept.

> -----Original Message-----
> From: Kay.Thielmann@materna.de [mailto:Kay.Thielmann@materna.de] 
> Sent: Monday, July 30, 2007 8:03 AM
> To: users@tapestry.apache.org
> Subject: T4: Adding a listener to a link that has not been 
> rendered in tapestry
> 
> I wrote a component which shows some html from an external 
> source. This html may contain some links. If one of this 
> links is clicked I need to call a listener to set some 
> parameters, but I don't know how to trigger the listener in this case.
> 
> Please help.
> 
> Kay Thielmann
> Mitarbeiter / BC Government Themen
> Business Unit Information
> ______________________________________________
> MATERNA GmbH Information & Communications Voßkuhle 37 * 44141 
> Dortmund * Deutschland
> Tel.: +49 231 5599-8297>
> kay.thielmann@materna.de * www.materna.de Hauptsitz der 
> MATERNA GmbH: Voßkuhle 37, 44141 Dortmund
> Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, 
> Ralph Hartwig Amtsgericht Dortmund HRB 5839
> 
> 
> ---------------------------------------------------------------------
> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


RE: T4: Adding a listener to a link that has not been rendered in tapestry

Posted by Ma...@bmw.ch.
you could use the EventListener mechanism to intercept the clicks, 
see http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html
If you know the link-id's in advance, it's particularly easy.
If you don't have control over the "external" links, you'll have to
come up with some javascript delegating the onclick events to a single
element controlled by tapestry which you can then intercept.

> -----Original Message-----
> From: Kay.Thielmann@materna.de [mailto:Kay.Thielmann@materna.de] 
> Sent: Monday, July 30, 2007 8:03 AM
> To: users@tapestry.apache.org
> Subject: T4: Adding a listener to a link that has not been 
> rendered in tapestry
> 
> I wrote a component which shows some html from an external 
> source. This html may contain some links. If one of this 
> links is clicked I need to call a listener to set some 
> parameters, but I don't know how to trigger the listener in this case.
> 
> Please help.
> 
> Kay Thielmann
> Mitarbeiter / BC Government Themen
> Business Unit Information
> ______________________________________________
> MATERNA GmbH Information & Communications Voßkuhle 37 * 44141 
> Dortmund * Deutschland
> Tel.: +49 231 5599-8297>
> kay.thielmann@materna.de * www.materna.de Hauptsitz der 
> MATERNA GmbH: Voßkuhle 37, 44141 Dortmund
> Geschäftsführer: Dr. Winfried Materna, Helmut an de Meulen, 
> Ralph Hartwig Amtsgericht Dortmund HRB 5839
> 
> 
> ---------------------------------------------------------------------
> 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