Examples of AjaxEvent


Examples of org.ajax4jsf.event.AjaxEvent

     
    }
    if(isSubmitted(context, component)){
            new ActionEvent(component).queue();
            if ("ajax".equals(getItemMode(component))) {
                new AjaxEvent(component).queue();
            }
    }
  }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxEvent

   
    String clientId = tooltip.getClientId(context);
   
    if(context.getExternalContext().getRequestParameterMap().containsKey(clientId)){
      if("ajax".equals(tooltip.getMode())){
        new AjaxEvent(component).queue();
      }
    }
  }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxEvent

  protected void doDecode(FacesContext context, UIComponent component) {
    if(isSubmitted(context, component)) {
      UIPanelMenuItem item = (UIPanelMenuItem)component;
      new ActionEvent(component).queue();
            if ("ajax".equals(getItemMode(component))) {
                new AjaxEvent(component).queue();
            }
    }
  }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxEvent

    if (isSubmitted(facesContext, uiComponent)) {
      ActionEvent event;
      event = new ActionEvent(uiComponent);
      uiComponent.queueEvent(event);

      uiComponent.queueEvent(new AjaxEvent(uiComponent));
    }
  }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxEvent

    if (null != ajaxParameter && ajaxParameter.equals(clientId)) {
        ajaxContainer.setSubmitted(true);
        if(ajaxContainer.isSelfRendered()){
          AjaxContext.getCurrentInstance(context).setSelfRender(true);
        }
        AjaxEvent event = new AjaxEvent(component);
        component.queueEvent(event);
    } else {
      ajaxContainer.setSubmitted(false);
    }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxEvent

       
        String clientId = tooltip.getClientId(context);
       
        if (context.getExternalContext().getRequestParameterMap().containsKey(clientId)) {
            if (AJAX_MODE.equals(tooltip.getMode())) {
                new AjaxEvent(component).queue();
                new ActionEvent(component).queue();
            }
        }
    }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxEvent

    }
   
    assertEquals(javaScripts.size(), getCountValidScripts(page, javaScripts, IS_PAGE_AVAILABILITY_CHECK).intValue());
  }
  public void testBroadcast() throws Exception{
    FacesEvent fe = new AjaxEvent(tooltip1);
    try{
    tooltip1.broadcast(fe);
    }catch(Exception e){fail();}
  }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxEvent

    } catch (Exception e) {
      //ignore
    }
    if(nc instanceof UIComponent) {
      UIComponent newComponent = (UIComponent)nc;
      AjaxEvent e = new AjaxEvent(newRoot);
      try {
//        newRoot.queueEvent(e);
        e = new AjaxEvent(newComponent);
        newComponent.queueEvent(e);
      } catch (Exception exc) {
        System.out.println("Cannot queue event: " + newComponent.getClass().getName());
      }
    }
View Full Code Here

Examples of org.ajax4jsf.event.AjaxEvent

///           String mode = ((UIDialogAction)component).getMode();
           ActionEvent event;
           event = new ActionEvent(component);
           component.queueEvent(event);
           if(component instanceof ViewIdHolder) {
             component.queueEvent( new AjaxEvent(component));
//             ((UIDialogWindow)component).initViewId();
//             AjaxContext.getCurrentInstance(context).setViewIdHolder((ViewIdHolder)component);
//             return;
           }

         } else {
         component.queueEvent( new AjaxEvent(component));
       }
    } else {
      /*
       * Child dialog has just been closed.
       * It simulates action of this component
       * by AJAX request from js function closeDialog()
       * Parameter 'targetViewId' is id of view
       * that would be shown in dialog window if it had not
       * to be closed. Now it is saved in event
       * to be substituted for view root of this window.
       */
      String targetViewId = (String)context.getExternalContext().getRequestParameterMap().get("targetViewId");
      if(targetViewId != null) {
        dialogEvent.setSourceViewId(targetViewId);
      }
      DialogContext parentContext = dcontext.getParentContext();
      dcontext.deactivate();
          if(parentContext != null) {
        DialogContextManager.getInstance(context).setActiveRequest(parentContext.getDialogId());
          } else if("closeall".equals(action)) {
          DialogContextManager.getInstance(context).setActiveRequest(null);
      } else {
          DialogContextManager.getInstance(context).setActiveRequest(null);
      }

          component.queueEvent(new DialogWindowClosedEvent(component));
         
       component.queueEvent( new AjaxEvent(component));
       dialogEvent.setClose(true);
    }
   
    /*
     * Queue event that will be processed during
View Full Code Here

Examples of org.ajax4jsf.event.AjaxEvent

      dcontext.setLocked(false);
      ViewHandler vh = UIDialogAction.getViewHandler(context);
      String targetActionURL = (String)((UIDialogWindow)component).getValue();
      targetActionURL = vh.getActionURL(context, targetActionURL);
          dcontext.setDialogPath(targetActionURL);
       component.queueEvent( new AjaxEvent(component));
       context.renderResponse();
    } else {
      String targetViewId = (String)context.getExternalContext().getRequestParameterMap().get("targetViewId");
      if(targetViewId != null) {
        dialogEvent.setSourceViewId(targetViewId);
      }
      DialogContext parentContext = dcontext.getParentContext();
      dcontext.deactivate();
          if(parentContext != null) {
        DialogContextManager.getInstance(context).setActiveRequest(parentContext.getDialogId());
          } else if("closeall".equals(action)) {
          DialogContextManager.getInstance(context).setActiveRequest(null);
      } else {
          DialogContextManager.getInstance(context).setActiveRequest(null);
      }
       dialogEvent.setClose(true);
       dialogEvent.queue();
       component.queueEvent( new AjaxEvent(component));
    }
   
  }
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.