{
new EventListener()
{
public void handleEvent(Event evt)
{
ItsNatEvent itsNatEvent = (ItsNatEvent)evt;
ClientDocument clientDoc = itsNatEvent.getClientDocument();
// We need the page title in this context
EventListener listener = new EventListener()
{
public void handleEvent(Event evt)
{
ItsNatContinueEvent contEvt = (ItsNatContinueEvent)evt;
String title = (String)contEvt.getExtraParam("title");
System.out.println("This is the title: " + title);
}
};
ParamTransport[] extraParams = new ParamTransport[] { new CustomParamTransport("title","document.title") };
clientDoc.addContinueEventListener(null,listener,itsNatEvent.getCommMode(),extraParams,null,-1);
}
};
}