Examples of AjaxRequestBuilder


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, 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())
                .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(params);
       
        if(form != null) {
            builder.form(form.getClientId(context));
        }
       
        builder.preventDefault();
               
        return builder.build();
    }
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.