Examples of AjaxRequestBuilder


Examples of org.primefaces.util.AjaxRequestBuilder

    }

  @Override
  public AjaxRequestBuilder getAjaxRequestBuilder() {
    if (this.ajaxRequestBuilder == null) {
      this.ajaxRequestBuilder = new AjaxRequestBuilder(context);
    }

    return ajaxRequestBuilder;
  }
View Full Code Here

Examples of org.primefaces.util.AjaxRequestBuilder

    protected String buildAjaxRequest(FacesContext context, AjaxSource source, UIComponent form) {
        UIComponent component = (UIComponent) source;
        String clientId = component.getClientId(context);

        AjaxRequestBuilder builder = RequestContext.getCurrentInstance().getAjaxRequestBuilder();

        builder.init()
                .source(clientId)
                .process(component, source.getProcess())
                .update(component, source.getUpdate())
                .async(source.isAsync())
                .global(source.isGlobal())
                .delay(source.getDelay())
                .timeout(source.getTimeout())
                .partialSubmit(source.isPartialSubmit(), source.isPartialSubmitSet(), source.getPartialSubmitFilter())
                .resetValues(source.isResetValues(), source.isResetValuesSet())
                .ignoreAutoUpdate(source.isIgnoreAutoUpdate())
                .onstart(source.getOnstart())
                .onerror(source.getOnerror())
                .onsuccess(source.getOnsuccess())
                .oncomplete(source.getOncomplete())
                .params(component);

        if(form != null) {
            builder.form(form.getClientId(context));
        }

        builder.preventDefault();

        return builder.build();
    }
View Full Code Here

Examples of org.primefaces.util.AjaxRequestBuilder

        String process = ajaxBehavior.getProcess();
        if (process == null) {
            process = "@this";
        }
     
        AjaxRequestBuilder builder = RequestContext.getCurrentInstance().getAjaxRequestBuilder();

        String request = builder.init()
                        .source(source)
                        .event(behaviorContext.getEventName())
                        .process(component, process)
                        .update(component, ajaxBehavior.getUpdate())
                        .async(ajaxBehavior.isAsync())
View Full Code Here

Examples of org.primefaces.util.AjaxRequestBuilder

  }
   
    protected String buildAjaxRequest(FacesContext context, AbstractMenu menu, AjaxSource source, UIComponent form, Map<String,List<String>> params) {
        String clientId = menu.getClientId(context);
       
        AjaxRequestBuilder builder = RequestContext.getCurrentInstance().getAjaxRequestBuilder();
       
        builder.init()
                .source(clientId)
                .process(menu, source.getProcess())
                .update(menu, source.getUpdate())
                .async(source.isAsync())
                .global(source.isGlobal())
                .delay(source.getDelay())
                .timeout(source.getTimeout())
                .partialSubmit(source.isPartialSubmit(), source.isPartialSubmitSet(), source.getPartialSubmitFilter())
                .resetValues(source.isResetValues(), source.isResetValuesSet())
                .ignoreAutoUpdate(source.isIgnoreAutoUpdate())
                .onstart(source.getOnstart())
                .onerror(source.getOnerror())
                .onsuccess(source.getOnsuccess())
                .oncomplete(source.getOncomplete())
                .params(params);
       
        if(form != null) {
            builder.form(form.getClientId(context));
        }
       
        builder.preventDefault();
               
        return builder.build();
    }
View Full Code Here

Examples of org.primefaces.util.AjaxRequestBuilder

        UIComponent form = ComponentUtils.findParentForm(context, poll);
        if(form == null) {
            throw new FacesException("Poll:" + clientId + " needs to be enclosed in a form component");
        }

        AjaxRequestBuilder builder = RequestContext.getCurrentInstance().getAjaxRequestBuilder();
       
        String request = builder.init()
                .source(clientId)
                .form(form.getClientId(context))
                .process(component, poll.getProcess())
                .update(component, poll.getUpdate())
                .async(poll.isAsync())
View Full Code Here

Examples of org.primefaces.util.AjaxRequestBuilder

        UIComponent form = (UIComponent) ComponentUtils.findParentForm(context, command);
        if(form == null) {
            throw new FacesException("RemoteCommand '" + name + "'must be inside a form.");
        }
       
        AjaxRequestBuilder builder = RequestContext.getCurrentInstance().getAjaxRequestBuilder();
       
        String request = builder.init()
                        .source(clientId)
                        .form(form.getClientId(context))
                        .process(component, source.getProcess())
                        .update(component, source.getUpdate())
                        .async(source.isAsync())
View Full Code Here

Examples of org.primefaces.util.AjaxRequestBuilder

      if(form == null) {
        throw new FacesException("Hotkey '"+ clientId+ "' needs to be enclosed in a form when ajax mode is enabled");
      }
           
            AjaxRequestBuilder builder = RequestContext.getCurrentInstance().getAjaxRequestBuilder();
       
            String request = builder.init()
              .source(clientId)
                .form(form.getClientId(context))
                .process(component, hotkey.getProcess())
                .update(component, hotkey.getUpdate())
                .async(hotkey.isAsync())
View Full Code Here

Examples of org.primefaces.util.AjaxRequestBuilder

    protected String buildAjaxRequest(FacesContext context, AjaxSource source, UIComponent form) {
        UIComponent component = (UIComponent) source;
        String clientId = component.getClientId(context);

        AjaxRequestBuilder builder = RequestContext.getCurrentInstance().getAjaxRequestBuilder();

        builder.init()
                .source(clientId)
                .process(component, source.getProcess())
                .update(component, source.getUpdate())
                .async(source.isAsync())
                .global(source.isGlobal())
                .delay(source.getDelay())
                .partialSubmit(source.isPartialSubmit(), source.isPartialSubmitSet())
                .resetValues(source.isResetValues(), source.isResetValuesSet())
                .ignoreAutoUpdate(source.isIgnoreAutoUpdate())
                .onstart(source.getOnstart())
                .onerror(source.getOnerror())
                .onsuccess(source.getOnsuccess())
                .oncomplete(source.getOncomplete())
                .params(component);

        if(form != null) {
            builder.form(form.getClientId(context));
        }

        builder.preventDefault();

        return builder.build();
    }
View Full Code Here

Examples of org.primefaces.util.AjaxRequestBuilder

        String process = ajaxBehavior.getProcess();
        if (process == null) {
            process = "@this";
        }
     
        AjaxRequestBuilder builder = RequestContext.getCurrentInstance().getAjaxRequestBuilder();

        String request = builder.init()
                .source(source)
                        .event(behaviorContext.getEventName())
                        .process(component, process)
                        .update(component, ajaxBehavior.getUpdate())
                        .async(ajaxBehavior.isAsync())
View Full Code Here

Examples of org.primefaces.util.AjaxRequestBuilder

        UIComponent form = ComponentUtils.findParentForm(context, poll);
        if(form == null) {
            throw new FacesException("Poll:" + clientId + " needs to be enclosed in a form component");
        }

        AjaxRequestBuilder builder = RequestContext.getCurrentInstance().getAjaxRequestBuilder();
       
        String request = builder.init()
            .source(clientId)
                .form(form.getClientId(context))
                .process(component, poll.getProcess())
                .update(component, poll.getUpdate())
                .async(poll.isAsync())
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.