Package de.innovationgate.wgpublisher.webtml.utils

Examples of de.innovationgate.wgpublisher.webtml.utils.TMLActionException


      if (!actionLink.getContextPath().equals(TMLActionLink.EMPTY_PARAM)) {
        actionContext = actionContext.context(actionLink.getContextPath(), false);
           
            // Could not retrieve context. Too dangerous to execute action under the wrong context.
            if (actionContext == null) {
                throw new TMLActionException("Unable to retrieve action context: " + actionLink.getContextPath());
            }           
      } else {
        //B00004602
       
        // no context path - switch to dummy context of the given db 
        actionContext = getTMLContext().context("db:" + actionLink.getDbKey(), false);
       
        // Could not retrieve dummy context. Too dangerous to execute action under the wrong context.
        if (actionContext == null) {
          throw new TMLActionException("Unable to retrieve action context: db:" + actionLink.getDbKey());
        }
      }
     
      // Temporarily set portlet namespace, WebTML scope
      BaseTagStatus tag = getTMLContext().getDesignContext().getTag();
      TMLOptionPreserver preserver = new TMLOptionPreserver(tag);
       preserver.preserve(Base.OPTION_PORTLET_NAMESPACE, actionLink.getPortletKey());
        preserver.preserve(Base.OPTION_WEBTML_SCOPE, actionLink.getWebtmlScope());
     
        try {
        // Inner call, depends, if this a default action or not
        if (actionLink.isDefaultAction()) {
          actionContext.callDefaultAction(actionLink.getDefaultAction(), params);
          if (actionLink.getPortletmode() != null && actionContext.getportlet() != null) {
            actionContext.getportlet().setmode(actionLink.getPortletmode());
          }
          applyPortletContext(actionLink, actionContext);
          return null;
        }
        else {
          TMLAction tmlAction = (TMLAction) getTMLContext().getActionRegistration().get(actionLink.getActionKeyInteger());
          if (tmlAction == null) {
            throw new TMLActionException("Could not find action for key " + actionLink.getActionKey());
          }
          actionContext.callCustomAction(tmlAction, params);
          if (actionLink.getPortletmode() != null && actionContext.getportlet() != null) {
              if (getTMLContext().isdefined("actionresult")) {
                      ExpressionResult expressionResult = (ExpressionResult) getTMLContext().item("actionresult");
View Full Code Here

TOP

Related Classes of de.innovationgate.wgpublisher.webtml.utils.TMLActionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.