*/
public void handleEvent(Event event) {
super.handleEvent(event);
try {
if (event instanceof XMLEvent) {
XMLEvent xmlEvent = (XMLEvent) event;
String type = xmlEvent.getType();
if (ChibaEventNames.REPLACE_ALL.equals(type)) {
// get event context and store it in session
Map submissionResponse = new HashMap();
submissionResponse.put("header", xmlEvent.getContextInfo("header"));
submissionResponse.put("body", xmlEvent.getContextInfo("body"));
this.xformsSession.setProperty(ChibaServlet.CHIBA_SUBMISSION_RESPONSE,submissionResponse);
// get event properties
Element target = (Element) event.getTarget();
String targetId = target.getAttributeNS(null, "id");
String targetName = target.getLocalName();
// add event properties to log
this.eventLog.add(type, targetId, targetName);
this.exitEvent = xmlEvent;
shutdown();
return;
} else if (ChibaEventNames.LOAD_URI.equals(type)) {
// get event properties
String show = (String) xmlEvent.getContextInfo("show");
// add event to log
this.eventLog.add(xmlEvent);
if ("replace".equals(show)) {
this.exitEvent = xmlEvent;