Package javax.faces.el

Examples of javax.faces.el.MethodBinding


        final String popupAction = (String)parameters.get(PopupRenderer.POPUP_FRAME_HIDDEN);
        if (popupAction != null && popupAction.equals(getHiddenFieldOpen(
                    command,
                    context)))
        {
            final MethodBinding binding = command.getActionOpen();
            command.setAction(binding);
            final ActionEvent actionEvent = new ActionEvent(command);
            if (command.isImmediate())
            {
                command.queueEventImmediate(actionEvent);
            }
            else
            {
                command.queueEventNormal(actionEvent);
            }
        }
        else if (popupAction != null && popupAction.equals(getHiddenFieldClose(
                    command,
                    context)))
        {
            final MethodBinding binding = command.getActionClose();
            if (binding != null)
            {
                command.setAction(binding);
                ActionEvent actionEvent = new ActionEvent(command);
                command.queueEventImmediate(actionEvent);
View Full Code Here


        }
        if (actionClose != null)
        {
            if (isValueReference(actionClose))
            {
                final MethodBinding binding = this.createMethodBinding(
                        actionClose,
                        new Class[0]);
                command.setActionClose(binding);
            }
            else
            {
                throw new IllegalStateException("Invalid actionClose." + actionClose);
            }
        }
        if (actionOpen != null)
        {
            if (isValueReference(actionOpen))
            {
                final MethodBinding binding = this.createMethodBinding(
                        actionOpen,
                        new Class[0]);
                command.setActionOpen(binding);
            }
            else
View Full Code Here

      if (!(component instanceof EditableValueHolder)) {
        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);
      }
    }
  }
View Full Code Here

      throw new IllegalArgumentException("component arg is not MultiActionSource");
    }
    ResponseWriter responseWriter = facesContext.getResponseWriter();
    StringBuffer stringBuffer = new StringBuffer();
    MultiActionSource xulComponent = (MultiActionSource) component;
    MethodBinding methodBinding = xulComponent.getMethodBinding(attributeName);
    if(methodBinding != null){
      stringBuffer.append("triggerBindedMethod('");
      stringBuffer.append(component.getClientId(facesContext));
      stringBuffer.append("','");
      stringBuffer.append(attributeName);
View Full Code Here

    if(isMethodBindedSubmitted(facesContext, component)){
      Map params = facesContext.getExternalContext().getRequestParameterMap();
      String value = (String) params.get(METHOD_BINDED_PREFIX+component.getClientId(facesContext));
      if(component instanceof MultiActionSource){
        MultiActionSource multiActionSource = (MultiActionSource) component;
        MethodBinding methodBinding = multiActionSource.getMethodBinding(value);
        multiActionSource.setAction(methodBinding);
        if(methodBinding != null){
          component.queueEvent(new ActionEvent(component));
        }
      }
View Full Code Here

  @Override
  protected void renderBindedMethod(FacesContext facesContext, UIComponent component, String attributeName) throws IOException {
    ResponseWriter responseWriter = facesContext.getResponseWriter();
    StringBuffer stringBuffer = new StringBuffer();
    MultiActionSource xulComponent = (MultiActionSource) component;
    MethodBinding methodBinding = xulComponent.getMethodBinding(attributeName);
    if(methodBinding != null){
      stringBuffer.append("XUL_FACES_BRIDGE.saveTreeSelection(document.getElementById('");
      stringBuffer.append(component.getClientId(facesContext));
      stringBuffer.append("'));");
      stringBuffer.append("triggerBindedMethod('");
View Full Code Here

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

      UIComponent component, String actionListener) {
    if (!(component instanceof ActionSource)) {
      throw new IllegalArgumentException("Component "
          + component.getClientId(context) + " is no ActionSource");
    }
    MethodBinding mb;
    final Class[] ACTION_LISTENER_ARGS = { ActionEvent.class };
    if (actionListener != null) {
      if (isValueReference(actionListener)) {
        mb = context.getApplication().createMethodBinding(
            actionListener, ACTION_LISTENER_ARGS);
View Full Code Here

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

        if (event instanceof ActionEvent)
        {
            FacesContext context = getFacesContext();

            MethodBinding mb = getActionListener();
            if (mb != null)
            {
                mb.invoke(context, new Object[]
                { event });
            }

            ActionListener defaultActionListener = context.getApplication()
                    .getActionListener();
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.