Examples of TMLAction


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

        Scriptable obj = func.construct(cx, thisObj, new Object[] {});
        Scriptable topLevelScope = ScriptableObject.getTopLevelScope(thisObj);

        // Put the action definition to the object, so it "knows" where it's
        // definition came from
        TMLAction action = (TMLAction) func.get(RhinoExpressionEngine.PARAM_ACTIONDEFINITION, func);
        if (action != null) {
            obj.put(RhinoExpressionEngine.PARAM_ACTIONDEFINITION, obj, action);
        }

        // Execute constructor
View Full Code Here

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

        NativeObject currentObject = (NativeObject) parsedArgs.get("currentObject");

        // Get the function def (might need to expand local name by the name of
        // the current action)
        // Locate object definition
        TMLAction action = null;
        try {
            if (design._currentObject != null) {
                TMLAction.Locator locator = WGAGlobal.determineActionLocator(cx, design._currentObject, context, actionID);
                action = context.getModuleActionByID(locator.getId(), locator.getDbkey());
            }
            else {
                action = context.getModuleActionByID(actionID, design._designContext.getDesignDB().getDbReference());
            }
        }
        catch (TMLActionException e) {
            throw new EvaluatorException("Could not retrieve TMLScript module '" + args[0] + "': " + e.getMessage());
        }
       
        if (action == null) {
            throw new EvaluatorException("Could not retrieve TMLScript module '" + args[0] + "'");
        }
       
        // Fetch runtime and return function object
        RhinoExpressionEngineImpl runtime = WGAGlobal.fetchRuntime(cx);
       
        // Use Context Redirector as scope, so the objects implicit context always directs to the current script's context
        ContextRedirector redirector = new ContextRedirector();
       
        // Preserve thread locals
        ThreadLocalPreserver preserver = new ThreadLocalPreserver((RhinoContext) cx);
        preserver.preserve(RhinoExpressionEngine.TL_ACTIONDEFINITION, action);
        preserver.preserve(RhinoExpressionEngine.TL_SCRIPTNAME, "TMLScript-Object " + action.getModuleDatabase() + "/" + action.getModuleName());;
        try {
            Function func = runtime.getCompiledFunction(action.getCode(), (RhinoContext) cx, redirector);
            func.put(RhinoExpressionEngine.PARAM_ACTIONDEFINITION, func, action);
            return func;
        }
        finally {
            preserver.restore();
View Full Code Here

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

    }
   
    private void updateDefaultAction(FormInfo info) throws WGAPIException {
        String defaultActionID = getDefaultaction();
        if (defaultActionID != null) {
            TMLAction defaultAction = getTMLContext().getActionByID(defaultActionID, getDesignDBKey());
            if (defaultAction != null) {
                List params = new ArrayList();
                // Dunno what to add to params. Neccessary data should be retrievable from tmlfrom object
                info.setDefaultAction(defaultAction.createActionLink(params, getTMLContext()).getEncodedString(getCore()));  
            }
            else {
                addWarning("Unknown default action '" + defaultActionID + "'");
            }
        }
View Full Code Here

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

    public void setSourceline(String string) {
        sourceline = string;
    }

    protected String buildCallActionLink(String sAction, String formID, List params, String portletMode, String portletContext) throws WGAPIException {
        TMLAction tmlAction = getTMLContext().getActionByID(sAction, getDesignDBKey());
        if (tmlAction != null) {
            TMLActionLink actionLinkObj = tmlAction.createActionLink(params, getTMLContext());
            actionLinkObj.setPortletmode(portletMode);
            if (portletContext != null) {
              actionLinkObj.setPortletContextPath(getTMLContext(), portletContext);
            }
           
View Full Code Here

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

            List params = new ArrayList();
            params.add("content");
            params.add(mediaKey);
            params.add(layoutKey);
            params.add(completeUrl);
            TMLAction tmlAction = context.getActionByID(linkAction, context.getDesignDBKey());
            if (tmlAction != null) {
                return context.getURLBuilder().buildActionURL(context, tmlAction, params, null, context.getpath());
            }
            else {
                return "";
View Full Code Here

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

            List params = new ArrayList();
            params.add("layout");
            params.add(mediaKey);
            params.add(layoutKey);
            params.add(url.toString());
            TMLAction tmlAction = context.getActionByID(linkAction, designdbKey);
            if (tmlAction != null) {
                return context.getURLBuilder().buildActionURL(context, tmlAction, params, null, null);
            }
            else {
                return "";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.