Package org.openfaces.event

Examples of org.openfaces.event.AjaxActionEvent


                        elContext, "#{" + action + "}", String.class, new Class[]{});
                /*result = */
                methodBinding.invoke(elContext, null);
            }
            if (listener != null) {
                AjaxActionEvent event = new AjaxActionEvent(component);
                event.setPhaseId(Boolean.valueOf(request.getParameter(PARAM_IMMEDIATE)) ? PhaseId.APPLY_REQUEST_VALUES : PhaseId.INVOKE_APPLICATION);
                MethodExpression methodExpression = context.getApplication().getExpressionFactory().createMethodExpression(
                        elContext, "#{" + listener + "}", void.class, new Class[]{ActionEvent.class});
                try {
                    methodExpression.getMethodInfo(elContext);
                } catch (MethodNotFoundException e1) {
                    // both actionEvent and AjaxActionEvent parameter declarations are allowed
                    methodExpression = context.getApplication().getExpressionFactory().createMethodExpression(
                            elContext, "#{" + listener + "}", void.class, new Class[]{AjaxActionEvent.class});
                    try {
                        methodExpression.getMethodInfo(elContext);
                    } catch (MethodNotFoundException e2) {
                        Log.log("Couldn't find Ajax action handler method. Method expression: #{" + listener + "} . " +
                                "Note, the appropriate method should receive one parameter of either javax.faces.event.ActionEvent or " +
                                "org.openfaces.event.AjaxActionEvent type.", e2);
                        throw e2;
                    }
                }
                methodExpression.invoke(elContext, new Object[]{event});
                Object listenerResult = event.getAjaxResult();
                if (listenerResult != null)
                    result = listenerResult;
            }
            if (result != null)
                AjaxRequest.getInstance().setAjaxResult(result);
View Full Code Here

TOP

Related Classes of org.openfaces.event.AjaxActionEvent

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.