try {
actionLink = new TMLActionLink(URLDecoder.decode(actionKey, "UTF-8"),getCore());
long starttime = System.currentTimeMillis();
TMLAction action = callAction(actionLink, ajax);
long endtime = System.currentTimeMillis();
// We rebuild the session on the current context if the action was a master action
// to be able to pick up modifications done there (F00004096)
if (action != null && action.isMaster()) {
getTMLContext().db().reopenSession();
}
//F00004242
if (actionLink.getMode() != null && actionLink.getMode().equals(TMLActionLink.MODE_AJAX_NO_PORTLET_REFRESH)) {
// this is an ajax action call do not render content result but portletEvents
status._isAjaxNoRefreshCall = true;
appendResult("");
setEvalBody(false);
}
actioncalled = true;
if (debugNode != null) {
debugNode.addAttribute("actiontime", new Long(endtime - starttime).toString());
}
}
catch (TMLInvalidActionLinkException e) {
// Not logging these
}
catch (TMLActionException e) {
addWarning("Error calling TML action: " + e.getMessage());
}
catch (IOException e) {
addWarning("Error decoding action link: " + e.getMessage());
}
catch (WGAPIException e) {
addWarning("Error calling TML action: " + e.getMessage());
}
}
// Conditionally execute special action changeLanguage
WGPRequestPath path = (WGPRequestPath) request.getAttribute(WGACore.ATTRIB_REQUESTPATH);
if (path.getPreferredLanguageChange() != null) {
actionLink = new TMLActionLink(request.getSession());
actionLink.setDefaultAction(TMLAction.DEFAULTACTION_CHANGELANGUAGE);
try {
if (path.getPreferredLanguageChange().equals(WGPRequestPath.PREFERREDLANGUAGECHANGE_USECONTENT)) {
actionLink.setParam1((String) getTMLContext().meta("language"));
}
else {
actionLink.setParam1(path.getPreferredLanguageChange());
}
actionLink.setContextPath(getTMLContext().getpath());
TMLAction calledAction = callAction(actionLink, ajax);
// In case of a called master action we rebuild the session of the current db
// To let the following WebTML request reflect eventually done changes in the action
if (calledAction != null && calledAction.isMaster()) {
getTMLContext().db().reopenSession();
}
}
catch (TMLActionException e) {