Package javax.faces.component

Examples of javax.faces.component.ActionSource.addActionListener()


                .getValueExpression(faceletContext, Object.class) ,
                topParentComponent != null ?
                (Location) topParentComponent.getAttributes().get(
                    CompositeComponentELUtils.LOCATION_KEY) : null);
        }
        as.addActionListener(listener);
    }

    /**
     * TODO: Document me!
     */
 
View Full Code Here


    {
      ValueExpression valueExp = _value.getValueExpression(faceletContext, Object.class);
      ActionSource actionSource = (ActionSource)parent;
      ReturnActionListener listener = new ReturnActionListener();
      listener.setValueExpression(ReturnActionListener.VALUE_KEY, valueExp);
      actionSource.addActionListener(listener);
    }
  }

  private final TagAttribute _value;
}
View Full Code Here

      SetActionListener listener = new SetActionListener();
      listener.setValueExpression(SetActionListener.FROM_KEY,
                                  fromExpression);
      listener.setValueExpression(SetActionListener.TO_KEY,
                                  toExpression);
      actionSource.addActionListener(listener);
    }
  }

  private final TagAttribute _from;
  private final TagAttribute _to;
View Full Code Here

        ValueExpression b = null;
        if (this.binding != null) {
          b = this.binding.getValueExpression(ctx, ActionListener.class);
        }
        ActionListener listener = new LazyActionListener(this.listenerType, b);
        as.addActionListener(listener);
      }
        } else {
            throw new TagException(this.tag,
                    "Parent is not of type ActionSource, type is: " + parent);
        }
View Full Code Here

    final ELContext elContext = FacesContext.getCurrentInstance().getELContext();

    final ActionSource actionSource = (ActionSource) component;
    if (execute == null) {
      actionSource.addActionListener(new ResetFormActionListener());
    } else if (execute.isLiteralText()) {
      actionSource.addActionListener(new ResetInputActionListener(
          ComponentUtils.splitList((String) execute.getValue(elContext))));
    } else {
      actionSource.addActionListener(new ValueExpressionResetInputActionListener(execute));
View Full Code Here

    final ActionSource actionSource = (ActionSource) component;
    if (execute == null) {
      actionSource.addActionListener(new ResetFormActionListener());
    } else if (execute.isLiteralText()) {
      actionSource.addActionListener(new ResetInputActionListener(
          ComponentUtils.splitList((String) execute.getValue(elContext))));
    } else {
      actionSource.addActionListener(new ValueExpressionResetInputActionListener(execute));
    }
    return (SKIP_BODY);
View Full Code Here

      actionSource.addActionListener(new ResetFormActionListener());
    } else if (execute.isLiteralText()) {
      actionSource.addActionListener(new ResetInputActionListener(
          ComponentUtils.splitList((String) execute.getValue(elContext))));
    } else {
      actionSource.addActionListener(new ValueExpressionResetInputActionListener(execute));
    }
    return (SKIP_BODY);
  }

  @Override
View Full Code Here

  public void apply(final FaceletContext faceletContext, final UIComponent parent) throws IOException {
    if (parent instanceof ActionSource) {
      if (ComponentHandler.isNew(parent)) {
        final ActionSource actionSource = (ActionSource) parent;
        if (forComponent.isLiteral())  {
          actionSource.addActionListener(new PopupActionListener(forComponent.getValue()));
        } else {
          final ValueExpression forValueExpression = forComponent.getValueExpression(faceletContext, String.class);
          actionSource.addActionListener(new ValueExpressionPopupActionListener(forValueExpression));
        }
      }
View Full Code Here

        final ActionSource actionSource = (ActionSource) parent;
        if (forComponent.isLiteral())  {
          actionSource.addActionListener(new PopupActionListener(forComponent.getValue()));
        } else {
          final ValueExpression forValueExpression = forComponent.getValueExpression(faceletContext, String.class);
          actionSource.addActionListener(new ValueExpressionPopupActionListener(forValueExpression));
        }
      }
    } else {
      throw new TagException(tag, "Parent is not of type ActionSource, type is: " + parent);
    }
View Full Code Here

  public void apply(final FaceletContext faceletContext, final UIComponent parent) throws IOException {
    if (parent instanceof ActionSource) {
      if (ComponentHandler.isNew(parent)) {
        final ActionSource actionSource = (ActionSource) parent;
        if (execute == null) {
          actionSource.addActionListener(new ResetFormActionListener());
        } else if (execute.isLiteral())  {
          actionSource.addActionListener(new ResetInputActionListener(ComponentUtils.splitList(execute.getValue())));
        } else {
          final ValueExpression forValueExpression = execute.getValueExpression(faceletContext, String.class);
          actionSource.addActionListener(new ValueExpressionResetInputActionListener(forValueExpression));
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.