Examples of AjaxContext


Examples of org.ajax4jsf.context.AjaxContext

        writer.writeAttribute(HTML.id_ATTRIBUTE, id, null);
        writer.writeAttribute(HTML.NAME_ATTRIBUTE, id, null);
        writer.writeAttribute(HTML.value_ATTRIBUTE, string, null);
        writer.endElement(HTML.INPUT_ELEM);

        AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);

        if (ajaxContext.isAjaxRequest()) {
            ajaxContext.addRenderedArea(id);
        }

    }
View Full Code Here

Examples of org.ajax4jsf.context.AjaxContext

       
        responseWriter.writeAttribute("id", clientId + "content", null);
        if (AJAX_MODE.equals(component.getMode())) {
            // we want to avoid rendering toolTip content during initialy page
            // displaying
            AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
            if (ajaxContext != null && ajaxContext.getAjaxAreasToRender().contains(clientId + "content")) {
       
                responseWriter.write(value != null ? value.toString() : "");
               
                super.renderChildren(context, component);
            }
View Full Code Here

Examples of org.ajax4jsf.context.AjaxContext

   * @param fileUpload
   */
  private void onUploadComplete(FacesContext context, List<UploadItem> fileList,
      UIFileUpload fileUpload, boolean formUpload) {
    storeData(context, fileUpload, fileList);
    AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
    if ((Boolean)fileUpload.getAttributes().get(AjaxRendererUtils.AJAX_SINGLE_ATTR)) {
      ajaxContext.setAjaxSingleClientId(fileUpload.getClientId(context));
    }

    ajaxContext.setAjaxRequest(!formUpload);
  }
View Full Code Here

Examples of org.ajax4jsf.context.AjaxContext

        UIParameter p = (UIParameter)child;
        parameters.put(p.getName(), p.getValue());
      }
    }
   
    AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
    Map<String, Object> commonAjaxParameters = ajaxContext.getCommonAjaxParameters();
    if (commonAjaxParameters != null) {
      parameters.putAll(commonAjaxParameters);
    }
   
    return ((parameters.size() > 0) ? ScriptUtils.toScript(parameters) : JSReference.NULL);
View Full Code Here

Examples of org.ajax4jsf.context.AjaxContext

  }

  public void addPopupToAjaxRendered(FacesContext context,
      UICalendar component) {

    AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
    Set<String> ajaxRenderedAreas = ajaxContext.getAjaxRenderedAreas();
    String clientId = component.getClientId(context);

    if (ajaxContext.isAjaxRequest() && ajaxRenderedAreas.contains(clientId)) {
      ajaxRenderedAreas.add(clientId + "Popup");

      ajaxRenderedAreas.add(clientId + "IFrame");

      ajaxRenderedAreas.add(clientId + "Script");
View Full Code Here

Examples of org.ajax4jsf.context.AjaxContext

    if (requestParameterMap.get(clientId + CURRENT_DATE_PRELOAD) != null) {
      // TODO nick - nick - queue this event when ValueChangeEvent is
      // queued?
      new AjaxEvent(component).queue();

      AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
      if (ajaxContext.isAjaxRequest(context)) {
        ajaxContext.addAreasToProcessFromComponent(context, component);
      }
    }
   
    String selectedDateString = (String) requestParameterMap.get(clientId
        + "InputDate");
View Full Code Here

Examples of org.ajax4jsf.context.AjaxContext

        // ByPass UpdateModelValue
        context.renderResponse();
      } else if (event instanceof AjaxEvent) {
        // TODO - find all UIMessages components for a parent UIInput.
        // for an ajaxSingle component, re-render only target message.
        AjaxContext ajaxContext = AjaxContext
            .getCurrentInstance(context);
        ajaxContext.setSubmittedRegionClientId(this
            .getClientId(context));
      }
    }
  }
View Full Code Here

Examples of org.ajax4jsf.context.AjaxContext

  public UIComponent getSingleComponent() {
    return getParent();
  }

  public void encodeAjax(FacesContext context) throws IOException {
    AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
    Set<String> renderedAreas = ajaxContext.getAjaxRenderedAreas();
    for (UIComponent message : getMessages(context)) {
      if (message.isRendered()) {
        message.encodeAll(context);
        renderedAreas.add(message.getClientId(context));
      }
View Full Code Here

Examples of org.ajax4jsf.context.AjaxContext

   
  }
   
    public void reRenderScript(FacesContext context, UIComponent component) throws IOException {
     
      AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
 
      Set <String> areas = ajaxContext.getAjaxRenderedAreas();
      String clientId = component.getClientId(context);
 
      if (ajaxContext.isAjaxRequest() && areas.contains(clientId)){
        areas.add(clientId + "script");
      }
     
    }
View Full Code Here

Examples of org.ajax4jsf.context.AjaxContext

        // return function;
    }

    public void encodeTableMenu(FacesContext context, UIExtendedDataTable table)
            throws IOException {
        AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
        Object key = table.getRowKey();
        table.setRowKey(null);
        TableMenuRenderer menuRenderer = new RichTableMenuRenderer();
        menuRenderer.setSortFunction(getSortFunction(context, table));
        menuRenderer.setGroupFunction(getGroupFunction(context, table));
        menuRenderer
                .setChangeColumnVisibilityFunction(getChangeColumnVisibilityFunction(
                        context, table));
        menuRenderer.setPrepareFunction(getPreSendAjaxRequestFunction(context,
                table));
        for (Iterator<UIColumn> colums = table.getSortedColumns(); colums
                .hasNext();) {
            UIColumn col = colums.next();
            if (col.isRendered()) {
        String menuId = menuRenderer.renderMenu(context, table, col);
        ajaxContext.addRenderedArea(menuId);
      }
        }// for
        table.setRowKey(key);
    }
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.