Package javax.faces.application

Examples of javax.faces.application.Application.createMethodBinding()


    if (stateChangeListener != null) {
      if (UIComponentTag.isValueReference(stateChangeListener)) {
        Class[] arguments = {SheetStateChangeEvent.class};
        MethodBinding binding
            = application.createMethodBinding(stateChangeListener, arguments);
        data.setStateChangeListener(binding);
      } else {
        throw new IllegalArgumentException(
            "Must be a valueReference (actionListener): " + stateChangeListener);
      }
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

        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

    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

    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

  public static void setSortActionListener(UIData data, 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);
        data.setSortActionListener(binding);
      } else {
        throw new IllegalArgumentException(
            "Must be a valueReference (sortActionListener): " + actionListener);
View Full Code Here

    if (stateChangeListener != null) {
      if (UIComponentTag.isValueReference(stateChangeListener)) {
        Class[] arguments = {SheetStateChangeEvent.class};
        MethodBinding binding
            = application.createMethodBinding(stateChangeListener, arguments);
        data.setStateChangeListener(binding);
      } else {
        throw new IllegalArgumentException(
            "Must be a valueReference (actionListener): " + stateChangeListener);
      }
View Full Code Here

    if (stateChangeListener != null) {
      if (UIComponentTag.isValueReference(stateChangeListener)) {
        final Class[] arguments = {SheetStateChangeEvent.class};
        final MethodBinding binding
            = application.createMethodBinding(stateChangeListener, arguments);
        data.setStateChangeListener(binding);
      } else {
        throw new IllegalArgumentException(
            "Must be a valueReference (actionListener): " + stateChangeListener);
      }
View Full Code Here

          final ValueBinding binding = application.createValueBinding(ref);
          if (name.equals("NAME")) {
            final UICommand command = (UICommand) application.createComponent(UICommand.COMPONENT_TYPE);
            command.setRendererType("Link");
            command.setValueBinding("label", binding);
            final MethodBinding action = application.createMethodBinding("#{test.select}", new Class[0]);
            command.setAction(action);
            column.getChildren().add(command);
          } else {
            final UIOutput output = (UIOutput) application.createComponent(UIOutput.COMPONENT_TYPE);
            output.setValueBinding("value", binding);
View Full Code Here

  public static void setAction(ActionSource component, String action) {
    if (action != null) {
      if (UIComponentTag.isValueReference(action)) {
        final FacesContext facesContext = FacesContext.getCurrentInstance();
        final Application application = facesContext.getApplication();
        MethodBinding binding = application.createMethodBinding(action, null);
        component.setAction(binding);
      } else {
        component.setAction(new ConstantMethodBinding(action));
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.