Package javax.faces.flow

Examples of javax.faces.flow.MethodCallNode


        }
        Flow currentFlow = flowHandler.getCurrentFlow(context);
        if (null != currentFlow) {
            FlowNode node = currentFlow.getNode(outcome);
            if (node instanceof MethodCallNode) {
                MethodCallNode methodCallNode = (MethodCallNode) node;
                MethodExpression me = methodCallNode.getMethodExpression();
                if (null != me) {
                    List<Parameter> paramList= methodCallNode.getParameters();
                    Object[] params = null;
                    if (null != paramList) {
                        params = new Object[paramList.size()];
                        int i = 0;
                        ELContext elContext = context.getELContext();
                        for (Parameter cur : paramList) {
                            params[i++] = cur.getValue().getValue(elContext);
                        }
                    }
                   
                    Object invokeResult = me.invoke(context.getELContext(), params);
                    if (null == invokeResult) {
                        ValueExpression ve = methodCallNode.getOutcome();
                        if (null != ve) {
                            invokeResult  = ve.getValue(context.getELContext());
                        }
                    }
                    outcome = invokeResult.toString();
View Full Code Here


                                    complete = true;
                                }
                            }
                            if (!complete && flowNode instanceof MethodCallNode)
                            {
                                MethodCallNode methodCallNode = (MethodCallNode) flowNode;
                                String vdlViewIdentifier = calculateVdlViewIdentifier(facesContext, methodCallNode);
                                // note a vdlViewIdentifier could be a flow node too
                                if (vdlViewIdentifier != null)
                                {
                                    outcomeToGo = vdlViewIdentifier;
View Full Code Here

                                    complete = true;
                                }
                            }
                            if (!complete && flowNode instanceof MethodCallNode)
                            {
                                MethodCallNode methodCallNode = (MethodCallNode) flowNode;
                                String vdlViewIdentifier = calculateVdlViewIdentifier(facesContext, methodCallNode);
                                // note a vdlViewIdentifier could be a flow node too
                                if (vdlViewIdentifier != null)
                                {
                                    outcomeToGo = vdlViewIdentifier;
View Full Code Here

                                    complete = true;
                                }
                            }
                            if (!complete && flowNode instanceof MethodCallNode)
                            {
                                MethodCallNode methodCallNode = (MethodCallNode) flowNode;
                                String vdlViewIdentifier = calculateVdlViewIdentifier(facesContext, methodCallNode);
                                // note a vdlViewIdentifier could be a flow node too
                                if (vdlViewIdentifier != null)
                                {
                                    outcomeToGo = vdlViewIdentifier;
View Full Code Here

        }
        Flow currentFlow = flowHandler.getCurrentFlow(context);
        if (null != currentFlow) {
            FlowNode node = currentFlow.getNode(outcome);
            if (node instanceof MethodCallNode) {
                MethodCallNode methodCallNode = (MethodCallNode) node;
                MethodExpression me = methodCallNode.getMethodExpression();
                if (null != me) {
                    List<Parameter> paramList= methodCallNode.getParameters();
                    Object[] params = null;
                    if (null != paramList) {
                        params = new Object[paramList.size()];
                        int i = 0;
                        ELContext elContext = context.getELContext();
                        for (Parameter cur : paramList) {
                            params[i++] = cur.getValue().getValue(elContext);
                        }
                    }
                   
                    Object invokeResult = me.invoke(context.getELContext(), params);
                    if (null == invokeResult) {
                        ValueExpression ve = methodCallNode.getOutcome();
                        if (null != ve) {
                            invokeResult  = ve.getValue(context.getELContext());
                        }
                    }
                    outcome = invokeResult.toString();
View Full Code Here

                                    complete = true;
                                }
                            }
                            if (!complete && flowNode instanceof MethodCallNode)
                            {
                                MethodCallNode methodCallNode = (MethodCallNode) flowNode;
                                String vdlViewIdentifier = calculateVdlViewIdentifier(facesContext, methodCallNode);
                                // note a vdlViewIdentifier could be a flow node too
                                if (vdlViewIdentifier != null)
                                {
                                    outcomeToGo = vdlViewIdentifier;
View Full Code Here

       
        Flow flow = flowBuilder.getFlow();
        Assert.assertNotNull(flow);
        Assert.assertEquals("method1", flow.getStartNodeId());
       
        MethodCallNode mcn = flow.getMethodCalls().get(0);
        Assert.assertEquals("method1", mcn.getId());
        Assert.assertEquals("case1", mcn.getOutcome().getValue(facesContext.getELContext()));
        Assert.assertEquals("#{bean.check}", mcn.getMethodExpression().getExpressionString());
       
        mcn = flow.getMethodCalls().get(1);
        Assert.assertEquals("method2", mcn.getId());
        Assert.assertEquals("case2", mcn.getOutcome().getValue(facesContext.getELContext()));
        Assert.assertEquals("#{bean.checkTo}", mcn.getMethodExpression().getExpressionString());
    }
View Full Code Here

        }
        Flow currentFlow = flowHandler.getCurrentFlow(context);
        if (null != currentFlow) {
            FlowNode node = currentFlow.getNode(outcome);
            if (node instanceof MethodCallNode) {
                MethodCallNode methodCallNode = (MethodCallNode) node;
                MethodExpression me = methodCallNode.getMethodExpression();
                if (null != me) {
                    List<Parameter> paramList= methodCallNode.getParameters();
                    Object[] params = null;
                    if (null != paramList) {
                        params = new Object[paramList.size()];
                        int i = 0;
                        ELContext elContext = context.getELContext();
                        for (Parameter cur : paramList) {
                            params[i++] = cur.getValue().getValue(elContext);
                        }
                    }
                   
                    Object invokeResult = me.invoke(context.getELContext(), params);
                    if (null == invokeResult) {
                        ValueExpression ve = methodCallNode.getOutcome();
                        if (null != ve) {
                            invokeResult  = ve.getValue(context.getELContext());
                        }
                    }
                    outcome = invokeResult.toString();
View Full Code Here

        }
        Flow currentFlow = flowHandler.getCurrentFlow(context);
        if (null != currentFlow) {
            FlowNode node = currentFlow.getNode(outcome);
            if (node instanceof MethodCallNode) {
                MethodCallNode methodCallNode = (MethodCallNode) node;
                MethodExpression me = methodCallNode.getMethodExpression();
                if (null != me) {
                    List<Parameter> paramList= methodCallNode.getParameters();
                    Object[] params = null;
                    if (null != paramList) {
                        params = new Object[paramList.size()];
                        int i = 0;
                        ELContext elContext = context.getELContext();
                        for (Parameter cur : paramList) {
                            params[i++] = cur.getValue().getValue(elContext);
                        }
                    }
                   
                    Object invokeResult = me.invoke(context.getELContext(), params);
                    if (null == invokeResult) {
                        ValueExpression ve = methodCallNode.getOutcome();
                        if (null != ve) {
                            invokeResult  = ve.getValue(context.getELContext());
                        }
                    }
                    outcome = invokeResult.toString();
View Full Code Here

        }
        Flow currentFlow = flowHandler.getCurrentFlow(context);
        if (null != currentFlow) {
            FlowNode node = currentFlow.getNode(outcome);
            if (node instanceof MethodCallNode) {
                MethodCallNode methodCallNode = (MethodCallNode) node;
                MethodExpression me = methodCallNode.getMethodExpression();
                if (null != me) {
                    List<Parameter> paramList= methodCallNode.getParameters();
                    Object[] params = null;
                    if (null != paramList) {
                        params = new Object[paramList.size()];
                        int i = 0;
                        ELContext elContext = context.getELContext();
                        for (Parameter cur : paramList) {
                            params[i++] = cur.getValue().getValue(elContext);
                        }
                    }
                   
                    Object invokeResult = me.invoke(context.getELContext(), params);
                    if (null == invokeResult) {
                        ValueExpression ve = methodCallNode.getOutcome();
                        if (null != ve) {
                            invokeResult  = ve.getValue(context.getELContext());
                        }
                    }
                    outcome = invokeResult.toString();
View Full Code Here

TOP

Related Classes of javax.faces.flow.MethodCallNode

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.