if (pageNavigationalState != null)
{
publicNS = pageNavigationalState.getPortletPublicNavigationalState(portletRequest.getWindowId());
}
PortletInvocationContext portletInvocationContext = context.createPortletInvocationContext(portletRequest.getWindowId(), pageNavigationalState);
ActionInvocation actionInvocation = new ActionInvocation(portletInvocationContext);
//
actionInvocation.setMode(mode);
actionInvocation.setWindowState(windowState);