engine.service(context);
PortalURL url = context.getPortalURL();
if (url != null)
{
NavigationalState state = url.getNavigationalState();
PortletWindow actionWindow = state.getPortletWindowOfAction();
if (actionWindow == null)
{
Iterator windows = state.getWindowIdIterator();
while (windows.hasNext())
{
String windowId = (String)windows.next();
PortletMode mode = state.getMode(windowId);
WindowState wstate = state.getState(windowId);
if (wstate != null || mode != null)
{
String windowState = "";
if (wstate != null)
windowState = wstate.toString();
String portletMode = "";
if (mode != null)
portletMode = mode.toString();
Portlets portlets = ((JetspeedRunData)data).getProfile().getDocument().getPortlets();
traverse(portlets, windowId, windowState, portletMode, (JetspeedRunData)data);
}
}
}
if (actionWindow != null)
{
String windowId = actionWindow.getId().toString();
//String windowId = nav.getWindowIdFromKey(state[0]);
//System.out.println("got token = " + state[0]+ ", window id = " + windowId + ", action = " + state[1]);
Portlets portlets = ((JetspeedRunData)data).getProfile().getDocument().getPortlets();
//traverse(portlets, windowId, state[1], (JetspeedRunData)data);
String windowState = state.getState(actionWindow).toString();
if (windowState == null)
{
windowState = "";
}
PortletMode mode = state.getMode(actionWindow);
String portletMode = "";
if (mode != null)
portletMode = mode.toString();
traverse(portlets, windowId, windowState, portletMode, (JetspeedRunData)data);