String payload = (String) requestMap.get("portlet.bridge.tck.testAttr");
if (payload == null || !payload.equals(testName))
{
sessionMap.put(EVENT_TEST_FAILED, "Event received but request scope wasn't restored.");
}
return new EventNavigationResult(null, testName+"EventNavigation");
}
else if (testName.equals("eventScopeNotRestoredModeChangedTest"))
{
// test -- that the request attr set in action is restored
String payload = (String) requestMap.get("portlet.bridge.tck.testAttr");
if (payload == null || !payload.equals(testName))
{
sessionMap.put(EVENT_TEST_FAILED, "Event received but request scope wasn't restored.");
}
return new EventNavigationResult(null, testName+"EventNavigation");
}
else if (testName.equals("eventControllerTest"))
{
// Verify the event phase attribute is set
Bridge.PortletPhase phase = (Bridge.PortletPhase) requestMap.get(Bridge.PORTLET_LIFECYCLE_PHASE);
requestMap.put("tck.eventPhaseCheck", new Boolean(phase != null && phase == Bridge.PortletPhase.EVENT_PHASE));
// Now verify that a change to a public render parameter is carried forward
String currentValue = (String) requestMap.get("modelPRP");
if (currentValue == null) currentValue = "1";
else currentValue = currentValue.concat("1");
// Config is setup to exclude this value from bridge request scope -- so only get carried forward
// if received in render request
requestMap.put("modelPRP", currentValue);
// Stash copy of value in an attr that is carried forward to compare.
requestMap.put("tck.compareModelPRPValue", currentValue);
// Verify that event navigation works
return new EventNavigationResult(null, testName+"EventNavigation");
}
return null;
}