You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Veentjer - Anchor Men <p....@anchormen.nl> on 2005/06/01 12:25:17 UTC

How to use externalcallback

 
Have a problem understanding the externalcallback, but let me first
describe my problem. I have a searchpage that has a query. If I click on
a found result on that searchpage I need to go the the details page of
the result (no problem so far). But I want to have a button on the
details page to go back to the searchpage.
 
I wanted to solve this problem by using a callback. The searchpage
initializes the details page with a callback, so the details page can
active the callback.
 
If I use a  new PageCallback(this) than I go back to the searchpage. So
the callback is working. The only thing I`m missing is the state of the
searchpage -> the query parameter. That is why I`m looking at the
externalcallback.
 
I let the the searchpage implements the IExternalPage and the searchpage
has the following methods:
 
public void activateExternalPage(Object[] parameters, IRequestCycle
cycle){
     String query = (String)cycle.getServiceParameters()[0];
 setQuery(query);
}
 
public ICallback createCallback(IRequestCycle cycle){
 return new ExternalCallback(this,new Object[]{getQuery()});
}
 
If the callback gets executed, the activateExternalPage method crashes
on the first line with a nullpointerexception.
 
So I guess I`m doing something wrong, but I don`t understand what. 
 
 
 
Met vriendelijke groet,

Peter Veentjer
Anchor Men Interactive Solutions - duidelijk in zakelijke
internetoplossingen

Praediniussingel 41
9711 AE Groningen

T: 050-3115222
F: 050-5891696
E: p.veentjer@anchormen.nl
I : www.anchormen.nl <blocked::http://www.anchormen.nl/>