Package javax.faces.el

Examples of javax.faces.el.MethodBinding


            {
                throw new IllegalArgumentException("Component " + component.getClientId(context) + " is no EditableValueHolder");
            }
            if (isValueReference(validator))
            {
                MethodBinding mb = context.getApplication().createMethodBinding(validator,
                                                                                VALIDATOR_ARGS);
                ((EditableValueHolder)component).setValidator(mb);
            }
            else
            {
View Full Code Here


        {
            if (!(component instanceof ActionSource))
            {
                throw new IllegalArgumentException("Component " + component.getClientId(context) + " is no ActionSource");
            }
            MethodBinding mb;
            if (isValueReference(action))
            {
                mb = context.getApplication().createMethodBinding(action, null);
            }
            else
View Full Code Here

            {
                throw new IllegalArgumentException("Component " + component.getClientId(context) + " is no ActionSource");
            }
            if (isValueReference(actionListener))
            {
                MethodBinding mb = context.getApplication().createMethodBinding(actionListener,
                                                                                ACTION_LISTENER_ARGS);

                /**
                if(! Void.class.equals(mb.getType(context)))
                {
View Full Code Here

            {
                throw new IllegalArgumentException("Component " + component.getClientId(context) + " is no EditableValueHolder");
            }
            if (isValueReference(valueChangedListener))
            {
                MethodBinding mb = context.getApplication().createMethodBinding(valueChangedListener,
                                                                                VALUE_LISTENER_ARGS);
                /**
                if(! Void.class.equals(mb.getType(context)))
                {
                    throw new IllegalArgumentException(
View Full Code Here

        FacesContext context = getFacesContext();
        //invoke the mouselistener first
        if (event instanceof ScheduleMouseEvent)
        {
            ScheduleMouseEvent mouseEvent = (ScheduleMouseEvent) event;
            MethodBinding mouseListener = getMouseListener();

            if (mouseListener != null)
            {
                mouseListener.invoke(context,
                        new Object[] { mouseEvent });
            }
        }
       
        //then invoke private ScheduleActionListener for set
        //the selected entry (if exists), so other
        //listeners can retrieve it from getSelectedEntry.
        if (event.isAppropriateListener(_scheduleListener))
        {
            event.processListener(_scheduleListener);
        }

        //then invoke any other listeners
        super.broadcast(event);

        if (event instanceof ActionEvent)
        {
            //Call registered actionListener if applies
            MethodBinding actionListener = getActionListener();
   
            if (actionListener != null)
            {
                actionListener.invoke(context, new Object[] { event });
            }
           
            //Since UISchedule is an ActionSource component,
            //we should call to the application actionListener
            //when an ActionEvent happens.
View Full Code Here

    return items;
  }
  public static void setValidator(EditableValueHolder editableValueHolder, String validator) {
    if (validator != null && editableValueHolder.getValidator() == null) {
      if (UIComponentTag.isValueReference(validator)) {
        MethodBinding methodBinding =
            FacesContext.getCurrentInstance().getApplication().createMethodBinding(validator, VALIDATOR_ARGS);
        editableValueHolder.setValidator(methodBinding);
      }
    }
  }
View Full Code Here

        LOG.warn("Type reset is not supported");
      }
    } else {
      if (action != null) {
        if (UIComponentTag.isValueReference(action)) {
          MethodBinding binding = application.createMethodBinding(action, null);
          component.setAction(binding);
        } else {
          component.setAction(new ConstantMethodBinding(action));
        }
      }
View Full Code Here

    }
  }
  public static void setSuggestMethodBinding(UIInput component, String suggestMethod) {
    if (suggestMethod != null) {
      if (UIComponentTag.isValueReference(suggestMethod)) {
        final MethodBinding methodBinding = FacesContext.getCurrentInstance().getApplication()
            .createMethodBinding(suggestMethod, new Class[] {String.class});
        component.setSuggestMethod(methodBinding);
      } else {
        throw new IllegalArgumentException(
            "Must be a valueReference (suggestMethod): " + suggestMethod);
View Full Code Here

  public static void setActionListener(ActionSource command, String actionListener) {
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final Application application = facesContext.getApplication();
    if (actionListener != null) {
      if (UIComponentTag.isValueReference(actionListener)) {
        MethodBinding binding
            = application.createMethodBinding(actionListener, ACTION_LISTENER_ARGS);
        command.setActionListener(binding);
      } else {
        throw new IllegalArgumentException(
            "Must be a valueReference (actionListener): " + actionListener);
View Full Code Here

  public static void setValueChangeListener(EditableValueHolder valueHolder, String valueChangeListener) {
     final FacesContext facesContext = FacesContext.getCurrentInstance();
     final Application application = facesContext.getApplication();
     if (valueChangeListener != null) {
       if (UIComponentTag.isValueReference(valueChangeListener)) {
         MethodBinding binding
             = application.createMethodBinding(valueChangeListener, VALUE_CHANGE_LISTENER_ARGS);
         valueHolder.setValueChangeListener(binding);
       } else {
         throw new IllegalArgumentException(
             "Must be a valueReference (valueChangeListener): " + valueChangeListener);
View Full Code Here

TOP

Related Classes of javax.faces.el.MethodBinding

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.