Package javax.el

Examples of javax.el.MethodExpression


                                 Object sourceValue,
                                 UIComponent target) {

                ValueExpression ve = (ValueExpression) sourceValue;
                ExpressionFactory f = ctx.getApplication().getExpressionFactory();
                MethodExpression me = f.createMethodExpression(ctx.getELContext(),
                                                               ve.getExpressionString(),
                                                               Void.TYPE,
                                                               ACTION_LISTENER_ARGS);
                MethodExpression noArg = f.createMethodExpression(ctx.getELContext(),
                                                                  ve.getExpressionString(),
                                                                  Void.TYPE,
                                                                  NO_ARGS);

                ((ActionSource2) target).addActionListener(
View Full Code Here


                                 Object sourceValue,
                                 UIComponent target) {

                ValueExpression ve = (ValueExpression) sourceValue;
                ExpressionFactory f = ctx.getApplication().getExpressionFactory();
                MethodExpression me = f.createMethodExpression(ctx.getELContext(),
                                                               ve.getExpressionString(),
                                                               Void.TYPE,
                                                               VALIDATOR_ARGS);

                ((EditableValueHolder) target).addValidator(
View Full Code Here

                                 Object sourceValue,
                                 UIComponent target) {

                ValueExpression ve = (ValueExpression) sourceValue;
                ExpressionFactory f = ctx.getApplication().getExpressionFactory();
                MethodExpression me = f.createMethodExpression(ctx.getELContext(),
                                                               ve.getExpressionString(),
                                                               Void.TYPE,
                                                               VALUE_CHANGE_LISTENER_ARGS);
                MethodExpression noArg = f.createMethodExpression(ctx.getELContext(),
                                                                  ve.getExpressionString(),
                                                                  Void.TYPE,
                                                                  NO_ARGS);

                ((EditableValueHolder) target).addValueChangeListener(
View Full Code Here

   
    private void pushFlow(FacesContext context, Flow toPush, String lastDisplayedViewId) {
        FlowDeque<Flow> flowStack = getFlowStack(context);
        flowStack.addFirst(toPush, lastDisplayedViewId);
        FlowCDIContext.flowEntered();
        MethodExpression me  = toPush.getInitializer();
        if (null != me) {
            me.invoke(context.getELContext(), null);
        }
    }
View Full Code Here

        return flowStack.pollFirst();
       
    }
   
    private void callFinalizer(FacesContext context, Flow currentFlow) {
        MethodExpression me  = currentFlow.getFinalizer();
        if (null != me) {
            me.invoke(context.getELContext(), null);
        }
        FlowCDIContext.flowExited();
    }
View Full Code Here

            if (this.encoding != null) {
                String v = this.encoding.getValue(ctx);
                ctx.getFacesContext().getAttributes().put(RIConstants.FACELETS_ENCODING_KEY, v);
            }
            if (this.beforePhase != null) {
                MethodExpression m = this.beforePhase
                        .getMethodExpression(ctx, null, LISTENER_SIG);
                root.setBeforePhaseListener(m);
            }
            if (this.afterPhase != null) {
                MethodExpression m = this.afterPhase
                        .getMethodExpression(ctx, null, LISTENER_SIG);
                root.setAfterPhaseListener(m);
            }

            if (this.contracts != null) {
View Full Code Here

    @Override
    public MethodExpression getMethodExpression(FaceletContext ctx,
                                                Class type,
                                                Class[] paramTypes) {

        MethodExpression result;

        try {
            ExpressionFactory f = ctx.getExpressionFactory();
            if (ELUtils.isCompositeComponentLookupWithArgs(this.value)) {
                String message =
                      MessageUtils.getExceptionMessageString(ARGUMENTS_NOT_LEGAL_CC_ATTRS_EXPR);
                throw new TagAttributeException(this, message);
            }
            // Determine if this is a composite component attribute lookup.
            // If so, look for a MethodExpression under the attribute key
            if (ELUtils.isCompositeComponentMethodExprLookup(this.value)) {
                result = new AttributeLookupMethodExpression(getValueExpression(ctx, MethodExpression.class));
            } else if (ELUtils.isCompositeComponentExpr(this.value)) {
                MethodExpression delegate = new TagMethodExpression(this,
                                                 f.createMethodExpression(ctx,
                                                                          this.value,
                                                                          type,
                                                                          paramTypes));
                result = new ContextualCompositeMethodExpression(getLocation(), delegate);
View Full Code Here

        public void applyMetadata(FaceletContext ctx, Object instance) {
           
            ExpressionFactory expressionFactory = ctx.getExpressionFactory();

            MethodExpression methodExpressionOneArg = attr.getMethodExpression(
                ctx, null, ActionSourceRule.ACTION_LISTENER_SIG);
           
            MethodExpression methodExpressionZeroArg =
                    expressionFactory.createMethodExpression(
                        ctx, methodExpressionOneArg.getExpressionString(),
                        Void.class, ActionSourceRule.ACTION_LISTENER_ZEROARG_SIG);           
           
            ((ActionSource2) instance)
View Full Code Here

                }

                assert (null != expectedReturnType);
                assert (null != expectedParameters);

                MethodExpression me = f
                      .createMethodExpression(ctx.getELContext(),
                                              ve.getExpressionString(),
                                              expectedReturnType,
                                              expectedParameters);
                target.getAttributes().put(metadata.getName(),
View Full Code Here

          Date submittedCurrentDate = convertCurrentDate(currentDateString);
          dateChangeEvent.setCurrentDate(submittedCurrentDate);

          if (!submittedCurrentDate.equals(currentDate)) {
            updateCurrentDate(facesContext, submittedCurrentDate);
            MethodExpression methodExpression = getCurrentDateChangeListener();
            if (methodExpression != null) {
                methodExpression.invoke(facesContext.getELContext(), new Object[] { dateChangeEvent });
            }
          }
         
        } catch (Exception e) {
          // XXX nick - kaa - add log.debug(...)
View Full Code Here

TOP

Related Classes of javax.el.MethodExpression

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.