cd.setNewWindowState(null);
//Check for a portlet mode change
PortletMode newMode = cd.getNewPortletMode();
if (newMode != null) {
pap.changePortletMode(newMode);
PortletStateManager.setMode(portletWindow, newMode);
}
cd.setNewPortletMode(null);
// Process action if this is the targeted channel and the URL is an action URL