Examples of AjaxListener


Examples of org.ajax4jsf.event.AjaxListener

    assertNotNull(validator.getMessages(facesContext));
  }
 
  public void testAddRemoveListenerValidator() throws Exception {
   
    AjaxListener listener = new MethodExpressionAjaxListener(listenerExpression);
    validator.addAjaxListener(listener);
   
    HtmlPage page = renderView();
    assertNotNull(page);
    assertEquals(1, validator.getAjaxListeners().length);
View Full Code Here

Examples of org.ajax4jsf.event.AjaxListener

    assertEquals(1, validator.getAjaxListeners().length);
  }
 
  public void testBroadcast() throws Exception {
   
    AjaxListener listener = new MethodExpressionAjaxListener(listenerExpression);
    validator.addAjaxListener(listener);
   
    HtmlPage page = renderView();
    assertNotNull(page);
    validator.broadcast(new AjaxEvent(validator));
View Full Code Here

Examples of org.ajax4jsf.event.AjaxListener

   
  }
 
  public void testQueueEvent() throws Exception {
   
    AjaxListener listener = new MethodExpressionAjaxListener(listenerExpression);
    validator.addAjaxListener(listener);
   
    HtmlPage page = renderView();
    assertNotNull(page);
    validator.queueEvent(new ValidationEvent(validator));
View Full Code Here

Examples of org.ajax4jsf.event.AjaxListener

   * (non-Javadoc)
   *
   * @see org.ajax4jsf.framework.ajax.AjaxSource#getAjaxListeners()
   */
  public AjaxListener[] getAjaxListeners() {
    AjaxListener al[] = (AjaxListener[]) getFacesListeners(AjaxListener.class);
    return (al);

  }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxListener

            throws IOException, FacesException, FaceletException, ELException {
        if (parent instanceof AjaxSource) {
            // only process if parent was just created
            if (parent.getParent() == null) {
                AjaxSource src = (AjaxSource) parent;
                AjaxListener listener = null;
                ValueExpression ve = null;
                if (this.binding != null) {
                    ve = this.binding.getValueExpression(ctx,
                            AjaxListener.class);
                    // TODO - handle both JSF 1.2/1.1 cases.
View Full Code Here

Examples of org.ajax4jsf.event.AjaxListener

  /* (non-Javadoc)
   * @see org.ajax4jsf.framework.ajax.AjaxSource#getAjaxListeners()
   */
  public AjaxListener[] getAjaxListeners() {
        AjaxListener al[] = (AjaxListener [])
      getFacesListeners(AjaxListener.class);
        return (al);

  }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxListener

  }

  public void setAjaxListener(MethodExpression listener) {
    AjaxListener[] ajaxListeners = getAjaxListeners();
    for (int i = 0; i < ajaxListeners.length; i++) {
      AjaxListener ajaxListener = ajaxListeners[i];
      if (ajaxListener.getClass().equals(
          MethodExpressionAjaxListener.class)) {
        MethodExpressionAjaxListener expressionListener = (MethodExpressionAjaxListener) ajaxListener;
        if (expressionListener.getExpression() != listener) {
          removeAjaxListener(ajaxListener);
View Full Code Here

Examples of org.ajax4jsf.event.AjaxListener

  }

  public MethodExpression getAjaxListener() {
    AjaxListener[] ajaxListeners = getAjaxListeners();
    for (int i = 0; i < ajaxListeners.length; i++) {
      AjaxListener ajaxListener = ajaxListeners[i];
      if (ajaxListener.getClass().equals(
          MethodExpressionAjaxListener.class)) {
        MethodExpressionAjaxListener expressionListener = (MethodExpressionAjaxListener) ajaxListener;
        return expressionListener.getExpression();
      }
    }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxListener

        if (componentTag.getCreated()) {
            //Component was just created, so we add the Listener
            UIComponent component = componentTag.getComponentInstance();
            if (component instanceof AjaxSource) {
                AjaxListener listener;
                if(null != binding){
                   listener = new AjaxListenerHelper(new ValueBindingValueExpressionAdaptor(binding));
                } else {
        try {
                  String className = (String) type.getValue(FacesContext.getCurrentInstance().getELContext());
View Full Code Here

Examples of org.ajax4jsf.event.AjaxListener

        if (componentTag.getCreated()) {
            //Component was just created, so we add the Listener
            UIComponent component = componentTag.getComponentInstance();
            if (component instanceof AjaxSource) {
                AjaxListener listener;
                if(null != binding){
                  ValueBinding valueBinding;
                  try {
          valueBinding = FacesContext.getCurrentInstance().getApplication().createValueBinding(binding);
                  } catch (ReferenceSyntaxException e) {
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.