Package org.ofbiz.minilang

Examples of org.ofbiz.minilang.SimpleMethod.exec()


            // run simple method script to get a list of entities
            Document simpleDoc = UtilXml.readXmlDocument(xmlScript);
            Element simpleElem = simpleDoc.getDocumentElement();
            SimpleMethod meth = new SimpleMethod(simpleElem, null, null);
            MethodContext methodContext = new MethodContext(request, response, null);
            meth.exec(methodContext); //Need to check return string
            List<GenericValue> entityList = UtilGenerics.cast(request.getAttribute("entityList"));
            request.setAttribute("entityList", entityList);

        } catch (TemplateException ioe) {
            sendError(response, "Problem handling event");
View Full Code Here


            // run simple method script to get a list of entities
            Document simpleDoc = UtilXml.readXmlDocument(xmlScript);
            Element simpleElem = simpleDoc.getDocumentElement();
            SimpleMethod meth = new SimpleMethod(simpleElem, null, null);
            MethodContext methodContext = new MethodContext(request, response, null);
            String retStr = meth.exec(methodContext); //Need to check return string
            List entityList = (List) request.getAttribute("entityList");
            request.setAttribute("entityList", entityList);

        } catch (TemplateException ioe) {
            sendError(response, "Problem handling event");
View Full Code Here

                String errMsg = "ERROR: Could not complete the " + simpleMethod.getShortDescription() + " process, could not find SimpleMethod " + methodName + " in XML document in resource: " + xmlResource;
                methodContext.setErrorReturn(errMsg, simpleMethod);
                return false;
            }

            String returnVal = simpleMethodToCall.exec(methodContext);
            if (Debug.verboseOn()) Debug.logVerbose("Called inline simple-method named [" + methodName + "] in resource [" + xmlResource + "], returnVal is [" + returnVal + "]", module);

            if (returnVal != null && returnVal.equals(simpleMethodToCall.getDefaultErrorCode())) {
                // in this case just set the error code just in case it hasn't already been set, the error messages will already be in place...
                if (methodContext.getMethodType() == MethodContext.EVENT) {
View Full Code Here

            // run simple method script to get a list of entities
            Document simpleDoc = UtilXml.readXmlDocument(xmlScript);
            Element simpleElem = simpleDoc.getDocumentElement();
            SimpleMethod meth = new SimpleMethod(simpleElem, null, null);
            MethodContext methodContext = new MethodContext(request, response, null);
            meth.exec(methodContext); //Need to check return string
            List<GenericValue> entityList = UtilGenerics.cast(request.getAttribute("entityList"));
            request.setAttribute("entityList", entityList);

        } catch (TemplateException ioe) {
            sendError(response, "Problem handling event");
View Full Code Here

                String errMsg = "ERROR: Could not complete the " + simpleMethod.getShortDescription() + " process, could not find SimpleMethod " + methodName + " in XML document in resource: " + xmlResource;
                methodContext.setErrorReturn(errMsg, simpleMethod);
                return false;
            }

            String returnVal = simpleMethodToCall.exec(methodContext);
            if (Debug.verboseOn()) Debug.logVerbose("Called inline simple-method named [" + methodName + "] in resource [" + xmlResource + "], returnVal is [" + returnVal + "]", module);

            if (returnVal != null && returnVal.equals(simpleMethodToCall.getDefaultErrorCode())) {
                // in this case just set the error code just in case it hasn't already been set, the error messages will already be in place...
                if (methodContext.getMethodType() == MethodContext.EVENT) {
View Full Code Here

            // run simple method script to get a list of entities
            Document simpleDoc = UtilXml.readXmlDocument(xmlScript);
            Element simpleElem = simpleDoc.getDocumentElement();
            SimpleMethod meth = new SimpleMethod(simpleElem, null, null);
            MethodContext methodContext = new MethodContext(request, response, null);
            String retStr = meth.exec(methodContext); //Need to check return string
            List<GenericValue> entityList = UtilGenerics.cast(request.getAttribute("entityList"));
            request.setAttribute("entityList", entityList);

        } catch (TemplateException ioe) {
            sendError(response, "Problem handling event");
View Full Code Here

            // run simple method script to get a list of entities
            Document simpleDoc = UtilXml.readXmlDocument(xmlScript);
            Element simpleElem = simpleDoc.getDocumentElement();
            SimpleMethod meth = new SimpleMethod(simpleElem, null, null);
            MethodContext methodContext = new MethodContext(request, response, null);
            String retStr = meth.exec(methodContext); //Need to check return string
            List entityList = (List)request.getAttribute("entityList");
            request.setAttribute("entityList", entityList);
           
        } catch (TemplateException ioe) {
            sendError(response, "Problem handling event");
View Full Code Here

                String errMsg = "ERROR: Could not complete the " + simpleMethod.getShortDescription() + " process, could not find SimpleMethod " + methodName + " in XML document in resource: " + xmlResource;
                methodContext.setErrorReturn(errMsg, simpleMethod);
                return false;
            }
           
            String returnVal = simpleMethodToCall.exec(methodContext);
            if (Debug.verboseOn()) Debug.logVerbose("Called inline simple-method named [" + methodName + "] in resource [" + xmlResource + "], returnVal is [" + returnVal + "]", module);
           
            if (returnVal != null && returnVal.equals(simpleMethodToCall.getDefaultErrorCode())) {
                // in this case just set the error code just in case it hasn't already been set, the error messages will already be in place...
                if (methodContext.getMethodType() == MethodContext.EVENT) {
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.