I am trying to build an ExternalCallback during my validate method, in
order to return to the same place I was trying to reach when my
session expired.  I click on a link which includes query string
parameters courtesy of the parameter included in my listener and the
validate() method fails to authorize the anonymous user, so it builds
an ExternalCallback with parameters cycle.getListenerParameters() as
the array of params, which is always null.  The same thing occurs when
accessing getServiceParameters().

So, the brief form of the code looks like this:

public class MyPage
   extends BasePage
   implements IExternalPage, PageValidateListener
{
   public void pageValidate(PageEvent event)
   {
       if (notLoggedIn()) {
           LoginPage page = getLoginPage();
           page.setNextPage(new ExternalCallback(event.getPage(),
event.getRequestCycle().getServiceParameters());
           throw new PageRedirectException(page);
       }
   }

   public void activateExternalPage(Object[] parameters, IRequestCycle cycle) {
       cycle.setListenerParameters(parameters);
       log.debug("set listenerParams: " + parameters);
   }

   public IPage sampleListener(int someParameter) {
      IPage somePage = getSomePage();
       // do some work
       return somePage;
   }
}

So, basically, I can't figure out how to get the parameters AND I
cannot figure out how I would cause the listener to be called after
the redirect.

Any thoughts?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to